Using PHP Goutte scraper, "Uncaught InvalidArgumentException: The current node list is empty."

fapfactor

Newbie
Joined
Jul 9, 2019
Messages
15
Reaction score
2
Does anyone here have experience with PHP scraping use Goutte? I'm creating multiple clients and scraping a few levels deep. I've set the $client as per below, and am setting "setHeader" which is meant to help eradicate this issue, but error persists.

PHP:
$client = new Client();
$client->setHeader('User-Agent', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/44.0.2403.89 Chrome/44.0.2403.89 Safari/537.36');

Anyone have a recommendation?
 
You're scraping from the server using PHP?

That's probably not going to be a very good solution in the long run.

Anyway that's very specific exception there. Search the manuals.
 
Ya it's a little specific. I was curious if anyone is quite familiar with the Goutte PHP library
 
Back
Top