puphpeteer
puphpeteer copied to clipboard
Network.getAllCookies returns empty array
Describe the bug
I'm using this library https://packagist.org/packages/nesk/puphpeteer to get cookies from specific sites.
I've run some tests, and in some cases, I actually get some cookies, but I have no clue why for https://lanzadera.es/ I'm getting no cookies?
If I check my chrome browser, I can see the following cookies being dropped even before the cookie message is accepted:
- _ga
- _gid
- _uetsid
- _uetvid
However, I get none of them when running the below:
$this->puppeteer = new Puppeteer();
$this->browser = $this->puppeteer->launch(['args' => ['--no-sandbox', '--disable-setuid-sandbox']]);
$this->page = $this->browser->newPage();
$this->page->goto($href, ['waitUntil' => 'networkidle2']);
$this->page->_client->send('Network.getAllCookies');
Generated logs No logs are generatedç
Environment (please complete the following information):
- Ubuntu 22.04
- Node version: v16.2.0
- PHP version: 8.0.19
My Node package manager is:
- [x] NPM (specify the version)
- [ ] Yarn (specify the version)
- [ ] Other (specify the name and version)