Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headless mode returns empty html #633

Open
schovancova opened this issue Jul 2, 2024 · 0 comments
Open

Headless mode returns empty html #633

schovancova opened this issue Jul 2, 2024 · 0 comments

Comments

@schovancova
Copy link

Hello! There is a strange issue I've found where if I'm running Panther in non-headless mode the site gets scraped as expected, however if I add --headless arg, it returns just: <html><head></head><body></body></html>. This is not isolated for just 1 site, I've already come across couple of them suffering from this issue.

Code snippet:

$client = Client::createChromeClient(__DIR__ . "/drivers/chromedriver", [ '--headless']);
$crawler = $client->request('GET', 'https://www.chanel.com/gb/fashion/p/G31318Y50006C8378/slingbacks-goatskin-grosgrain/');
echo $crawler->html();

When removing the headless option actual HTML of the site is obtained correctly. I'm using using chromedriver version 126.0.6478.126 for mac-x64 platform, but using the same version for linux yields the same result. The version of Panther is newest - 2.1.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant