Http request getting text after javascript has run

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
bjorn82dk
Newbie
Posts: 13
Joined: Sat Jun 23, 2012 10:41 am
Location: Copgenhagen, Denmark

Http request getting text after javascript has run

Post by bjorn82dk » Tue Dec 23, 2014 6:15 pm

Greetings all you helpful people.

I'm trying to retrieve informations from a website using the http request code but it dosen't return the whole site. Without being a skilled www programmer I think that when people enters the site a javascript is run to gather informations - wich is what I like.

Site to take text from:
http://boligejer.dk/ejendomsdata-ois/0/ ... 6157572.39

The info I would like is located in the middel/right frame with the topic "GENERELLE OPLYSNINGER" and text below that point.

Any suggestions on how to brake this one? My top goal is that the script runs hidden and only parse the information to a variable. Any suggestions is welcome.

Best regards and a mary chrsitmas from Denmark.


Ps
Macus Tanner (if you are still reading on this forum), I have used Macro Schedueler for some years now (since vers. 7), this is an awesome program and the only reason for not posting in your forum more often than every 3 or 4 years is because things just seems to work and there documentations is easy to read true. Thumps up for a very nice program.

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Http request getting text after javascript has run

Post by Marcus Tettmar » Mon Dec 29, 2014 10:26 am

If the site is rendered using Javascript it needs to be loaded into a browser. HTTPRequest will only get the raw code. Javascript is client side so needs a browser context in order to be executed.

So instead of using HTTPRequest you will need to load the site in a web browser. Easiest way to do that is to use IE and Macro Scheduler's built in IE functions to extract the html.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts