Skip to content
Advertisement

Guzzle Symfony scrape iframes inside multiple Servers

I am building a scraper to scrape content using guzzle and symfony dom crawler But I run into an issue.

The page I am scraping has multiple Iframe servers They default iframe is shown when the scraper loads the page but in order to get the other servers it needs to click there buttons and so it reflects the server iframe.

How do I do that?

Advertisement

Answer

Guzzle can’t render Javascript websites so it doesn’t support that

There are two ways around this either check for network tabs and send the request to the ajax link they get the iframes from, or use symfony Panther as headless browser library they support javascript websites and even Bypass Cloudflare Protection

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement