Following your suggestion I seem to have fixed it. Just let me know for the last time if it works on your end. Thanks a trillion for your great support.
If I use this `CreateObject("HtmlFile")`, I won't be able to use `.querySelector()` and I have to rely on tag name, id e.t.c. However, what did you get after pressing that button?
Hi @YasserKhalil, are you around? Which excel version are you using? If you are using excel 2019, I wish to know what happens when you click on the button in the following excel workbook? I'm using excel 2016 and I get "19" in a message box when I run this macro.
Hi @YasserKhalil, hope you are doing well. Could you tell me the office version you have in your machine? I'm using office 2013 and the macro I've written is doing fine here. However, I need to know how the same macro behaves when it is tested on 2019. Thanks.
Is there any way I can fetch response from this api https://api.nasdaq.com/api/company/CTXS/earnings-surprise using xmlhttp requests? I've tried like the following but the script keeps buffering when it is made to run.
Sub GetResponse()
Const URL$ =...
I'm trying to develop a macro which should read the cells (Column B in the attached image) connected to different links and print them in immediate window. When I execute what I've created so far, I get "subscript out of range" error.
Sub PrintURL()
Dim cel As Range
For Each cel In...
I've created a macro to scrape proxies from a free proxy site. The macro is capable fetching the proxies when I use it within a subroutine. However, my intention is to print the proxy list within this subroutine "PrintProxies" via the function "GenerateProxy". I don't understand how to return...
One last thing - could you confirm whether it works when you replace this function `EncodeUriComponent` with this function `EncodeURL`. The rest should be as it is.
Function EncodeUriComponent(strText)
Static objHtmlfile As Object
If objHtmlfile Is Nothing Then
Set objHtmlfile...
That is not really the problem of the selector. That line threw that error when the response doesn't contain the stuff we are looking for. Your defined selector should work as well.
So you see it is possible to get rid of hardcoded `viewstate` and stuff which contain very long string that we discussed about years back. I've taken the logic from python by the way @YasserKhalil.
So far I can remember, he was getting some error which was pointing at this line
`elem = Htmldoc.querySelector("a.functionlink[id][href*='__doPostBack']").getAttribute("href")`. Thanks YasserKhalil for the feedback. It is always a pleasure to hear anything from you.
I've created a macro using xmlhttp requests to get the status of a Parcel ID from a website. This is how to populate the status manually.
1. When you track the site link , you will see an inputbox right next to parcel id. Use this id 03008088 and press the search button. You should see a new...
Okay, I'm pasting below some valid json for your consideration. As I copied the earlier sample directly from dev tools, they are botched up in syntax @shrivallabha. Thanks.
Rectified sample:
{
"secId": "FOUSA00FQU",
"name": "Vanguard Total Stock Mkt Idx Inv",
"totalSharesHeld"...
It looks ideal. This is the logic I probably should stick with. However, the only problem is that `elem.count` is `0` even when I get the data ridden response when I print `S`.
This is the very way I'm trying to achieve the results but I'm the last person who can claim to have any good knowledge on regex. However, I would mange if I could know how to do the iteration in such cases. Thanks @shrivallabha, it's always a pleasure.
I'm trying to fetch two fields from each container from some json response using regex. When I execute the script that I've written so far can produce the two fields from all the containers. However, the way I've defined the last loop doesn't seem to be an ideal one. To be clearer, I used the...
I find it very efficient. Just give it a shot. Bing doesn't block you, so you are safe to keep going.
Sub GetLinksFromBingSearch()
Const URL$ = "https://www.bing.com/search?q="
Const base$ = "https://www.bing.com"
Dim Http As New XMLHTTP60, HTML As New HTMLDocument
Dim...
The attached image is what I meant. Moreover, you need proxies to get the whole thing done as the site will ban your ip address after certain attempts. Thanks.
Okay, I've already created the script. It should exhaust the whole site other than the next page content available in some links like https://vymaps.com/AF/Badakhshan/establishment/. As the script I've written is a huge one, I didn't go for the pagination stuff. However, it will fetch you the...