0

I am working with PHP cURL/DOMDocument to scrape webpages. It works well, but I have some pages that loads the actual content after certain JS execution, In this scenario, the Xpath query returns null as it scraps the content from the target webpage before the JS execution.

How to make the CURL wait for few seconds before it starts the scraping?

chitown88
  • 27,527
  • 4
  • 30
  • 59
  • You need to use Javascript in some form to accomplish the scraping of dynamically added content - `node.js` is one possibility or a headless browser such as `casper.js`, `phantom.js` etc – Professor Abronsius Jul 07 '23 at 05:41

0 Answers0