Hi guys,
I asked the same question on stack overflow: http://stackoverflow.com/questions/2698 ... javascript
It seems that using the Yelp API is the recommended solution. Is there no way to do it in AHK with ComObject?
Will I have to learn Python to use the Yelp API or does AHK have some way of using the Yelp API as well?
Thanks,
Ben
Retrieving Page Source Generated by Javascript
- Blackholyman
- Posts: 1293
- Joined: 29 Sep 2013, 22:57
- Location: Denmark
- Contact:
Re: Retrieving Page Source Generated by Javascript
It can be done just fine with an IE COM object also from ahk
http://stackoverflow.com/questions/2698 ... 1#26990581
example:
Hope it helps
http://stackoverflow.com/questions/2698 ... 1#26990581
example:
Code: Select all
url := "http://www.yelp.com/search?find_desc=auto+repair&find_loc=70163&ns=1#l=g:-90.1266860962,29.9067341681,-90.0243759155,29.9959757119"
wb := ComObjCreate("InternetExplorer.Application")
wb.visible := true
wb.Navigate(url)
while wb.readyState!=4 || wb.document.readyState != "complete" || wb.busy
continue
sleep 100
while (wb.document.getElementsByClassName("throbber-overlay")[0].style.display != "none")
continue
msgbox % wb.document.getElementsByClassName("natural-search-result")[0].innertext
return
Courses on AutoHotkey
My Autohotkey Blog
Re: Retrieving Page Source Generated by Javascript
Amazing, that worked!
Thanks a lot, I think my issue was with:
while (ie.document.getElementsByClassName("throbber-overlay")[0].style.display != "none")
continue
I'm not even familiar enough with HTML / DOM to know about the existence of the throbber overlay, or even the existence of style.display.
My code worked as soon as I added that line.
Thanks a lot, I think my issue was with:
while (ie.document.getElementsByClassName("throbber-overlay")[0].style.display != "none")
continue
I'm not even familiar enough with HTML / DOM to know about the existence of the throbber overlay, or even the existence of style.display.
My code worked as soon as I added that line.
Who is online
Users browsing this forum: Google [Bot], Lamron750 and 384 guests