https://github.com/piedweb/google
Google Puppeteer in PHP
https://github.com/piedweb/google
Last synced: 4 months ago
JSON representation
Google Puppeteer in PHP
- Host: GitHub
- URL: https://github.com/piedweb/google
- Owner: PiedWeb
- Created: 2022-02-23T13:55:47.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-10T08:54:54.000Z (almost 2 years ago)
- Last Synced: 2024-10-10T10:29:40.928Z (almost 2 years ago)
- Language: PHP
- Homepage: https://dev.piedweb.com
- Size: 110 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Google (unofficial) API via PHP
[](https://github.com/PiedWeb/PiedWeb/tags)
[](LICENSE)
[](https://github.com/PiedWeb/PiedWeb/actions)
[](https://scrutinizer-ci.com/g/PiedWeb/PiedWeb)
[](https://codecov.io/gh/PiedWeb/PiedWeb/branch/main)
[](https://shepherd.dev/github/PiedWeb/PiedWeb)
[](https://packagist.org/packages/piedweb/google)
Via Curl or Puppeteer. This lib offers for now :
- SERP extraction
- Suggests
- _Trends_ dropped
## Requirements
- node (tested with v20)
- [puppeteer](package.json) (tested with v23) `npm install puppeteer puppeteer-extra puppeteer-extra-plugin-stealth`
- php ^8.3
- `composer require piedweb/google`
## Google
Still no docs, see [tests/\*](tests/) :
## Fix TroubleShoot
```
Failed to launch the browser process!
[57007:57007:1010/104537.301500:FATAL:zygote_host_impl_linux.cc(128)] No usable sandbox! If you are running o n Ubuntu 23.10+ or another Linux distro that has disabled unprivileged user namespaces with AppArmor, see https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md. Otherwise seehttps://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the (older) SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
TROUBLESHOOTING: https://pptr.dev/troubleshooting
```
Since Ubuntu 23 (same with Ubuntu 24), it's not possible to directly use the chrome version downloaded by _puppeteer_ on package installation.
Workaround are details here :
https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
It's also possible to use an ever installed Chrome on your OS by defining _env_ variable **CHROME_BIN**.
### Contributors
- [Pied Web](https://piedweb.com)
## See Also
- [PyTrends](https://github.com/GeneralMills/pytrends)
- [JsTrends](https://github.com/pat310/google-trends-ap)