0

The data from most webpages can be scraped by simply downloading the HTML and then parsing out the desired content. However some webpages load their content dynamically with JavaScript after the page loads so that the desired data is not found in the original HTML.

Please help me how I can get dynamically generated JavaScript data using web scraper.

3
  • In order to get dynamically generated JavaScript, you are going to need to locate a parser that is capable of running JavaScript. You may have a hard time finding one for PHP. Commented May 12, 2012 at 10:27
  • is there any parser available? Commented May 12, 2012 at 11:05
  • Sorry, but I do not think any good (if any) JS parser might be available in PHP. More genrally, it might be impossible to do so without actual parsing by browser. You might think of switching your language, in .NET family you can get WebBrowser Control or in Ruby, Watir. Commented May 12, 2012 at 11:25

1 Answer 1

0

You can use Web Developer Add-on for Firefox. Select View Source -> View generated source after the page finishes loading and you will get the contacts in HTML in a new window. You can then proceed with any parser you are currently using.

Sign up to request clarification or add additional context in comments.

1 Comment

Hi Alex, I didn't downvote you, but I think I can explain why others may have. It's not clear from the question, but I suspect other users here think that the op is looking for a programmatic solution to scraping dynamic Web pages, not a manual way. Still, before removing your answer, I really think it's worth asking Omar to clarify in his question, as if this is indeed what he's looking for, it could end up being the accepted answer. Good luck!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.