javascript - Extracting Data From Webpage That Isn't In the Source Code -


i'd write macro in excel pulls data webpage below:

http://www.richmond.com/data-center/salaries-virginia-state-employees-2013/?appsession=673718284851033&recordid=101177&pageid=3&prevpageid=2&cpipage=1&cpisorttype=&cpiorderby=&cbcurrentrecordposition=1

the problem i'm having employee information data isn't in page source when use code below (where nextpage set above url) responsetext doesn't include data i'm looking for.

with createobject("msxml2.xmlhttp")     .open "get", nextpage, false     .send     htm.body.innerhtml = .responsetext end 

i wrong believe data contained within page's dom. can me understand how can download contents of page displayed (i.e. after javascript modifications have been applied) using vbscript?

using internetexplorer.application com object should give access actual dom tree:

url = "http://www.richmond.com/..."  set ie = createobject("internetexplorer.application") ie.visible = true  ie.navigate url    wscript.sleep 100 until ie.readystate = 4  set elem = ie.document.getelementbyid("...") 

if doesn't work, may have resort phantomjs.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -