DEV Community 👩‍💻👨‍💻

Discussion on: Web Scraping in PHP using Goutte - part 2

Collapse
 
marcohern profile image
Marco Hernandez

What about Scraping Single Page Apps like angular or react apps? Does Goutte support's this? is this even possible using PHP? Is there anything that can do this? I've been looking for info in Client Side Rendered Scraping but there is little information.

Collapse
 
sayopaul profile image
Sayo Paul Author

Yes, it is in fact possible with PHP. The tools use for this are called headless browsers. Headless browsers act as regular browsers ( running javascript, etc. ) Using a headless browser, javascript rendered pages can be scraped. We combine Goutte's crawler with the response from a headless browser such as Selenium or PhantomJS and we are able to use all of Goutte's crawling functions. This is personally what I use for scraping those type of sites.