-
Notifications
You must be signed in to change notification settings - Fork 128
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
How to specify CHROME arg "--user-agent" in extra_args in order to mimic a non-headless browser? #319
Comments
Is this a pagedown question on how to pass argument in If this is a question on which user agent to set to bypass the restriction on the website you want to reach, I'll bet you'll find answer on the web. Also if a website has some policy and put in place restriction, you should carefully read the rules of the website to still be authorize to do what you want to do. Usually security measure like prevent headless access are there for a reason. Anyhow, happy to help with any pagedown bug, for the rest we are not expert in headless chrome usage. Hope it helps |
@cderv The browser is still recognized as headless on this test-page. Do I have to escape something, or is perhaps the syntax wrong? Anyway, I solved the problem meanwhile using chromote. Thanks a lot ! |
You could try without the space after |
Hello,
I use R version 4.3.1 and R-Studio 2023.09.0 Build 463 under Windows 10 Enterprise.
The following R-Code downloads a website as PDF:
When executing this code with test- webpage https://www.whatsmybrowser.org/ it returns correctly as browser "You are using Headless Chrome 117."
PROBLEM:
Some webpages block out headless browsers, which then gives the error code "HTTP status code: 404".
I know, that "--user-agent" has to be added into extra_args somehow, in order to mimic a normal, i.e. non-headless browser, see also here: https://useragentstring.com/
Could anyone help me how to code this?
The goal is, that this test-website does not return anymore "You are using Headless Chrome 117.", but e.g. "You are using Chome 117" ?
Thanks a lot!
The text was updated successfully, but these errors were encountered: