Parsing rendered html after javascript

P

parkurm

I'm trying to write a website that parses all images in a given
webpage. I initially tried to get all image links by looking for <img>
tag, by using nokogiri html parser, and it works well with webpages
without javascript.

Some pages use javascript to render the view, and using nokogiri, I'm
just getting raw html results before it's rendered.

How can I get a page after being rendered by javascript?
 
P

Pierre Lecocq

parkurm said:
I'm trying to write a website that parses all images in a given
webpage. I initially tried to get all image links by looking for <img>
tag, by using nokogiri html parser, and it works well with webpages
without javascript.

Some pages use javascript to render the view, and using nokogiri, I'm
just getting raw html results before it's rendered.

How can I get a page after being rendered by javascript?

Hi,

It implies that you pass the javascript code to a ... javascript
interpreter !
take a look at that:
http://tenderlovemaking.com/2008/01/03/happy-new-year-rkelly-progress-report/

Regards,
Pierre
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,113
Latest member
Vinay KumarNevatia
Top