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

Allow setting puppeteer headless mode in userConfig #45

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

ole-ve
Copy link
Contributor

@ole-ve ole-ve commented Mar 16, 2024

Using headless: true seems to have a significant performance impact over using headless: 'shell'.
There is an issue in the puppeteer repository and during some testing, I found using shell was around 7-8 times faster for my queries.

It would be great if one could set the puppeteer headless mode by defining it as an input argument.

@ole-ve
Copy link
Contributor Author

ole-ve commented Mar 16, 2024

If you find time, would be great if you could take a look @lewisdonovan (I cannot assign reviewers myself)

@lewisdonovan
Copy link
Owner

Great find! Tested locally and it gives a performance boost of roughly 30%. I'll merge this now and update the NPM module shortly.

@lewisdonovan lewisdonovan merged commit e00eb18 into lewisdonovan:master Mar 18, 2024
lewisdonovan pushed a commit that referenced this pull request Mar 18, 2024
@lewisdonovan
Copy link
Owner

Latest version now available in NPM. To update please run npm update google-news-scraper.

@ole-ve
Copy link
Contributor Author

ole-ve commented Mar 18, 2024

Thanks a lot for the fast merging 👍

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

Successfully merging this pull request may close these issues.

2 participants