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

Document overriding user-agent #27

Closed
pawelmhm opened this issue Sep 28, 2021 · 3 comments · Fixed by #29
Closed

Document overriding user-agent #27

pawelmhm opened this issue Sep 28, 2021 · 3 comments · Fixed by #29
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@pawelmhm
Copy link
Collaborator

pawelmhm commented Sep 28, 2021

User agent from playwright is overwritten with Scrapy user agent: https://github.com/scrapy-plugins/scrapy-playwright/blob/master/scrapy_playwright/handler.py#L213 I think this should be mentioned in documentation, many users are settings browser-like user-agents in scrapy settings, e.g. Chrome user agent. Many will not think about it but from the point of view of some websites doing request fingerprinting it can look like user-agent spoofing, because they will for example use playwright Firefox, fingerprint will be for firefox, but with Chrome user-agent from settings.py

@Gallaecio Gallaecio added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 28, 2021
@scrapenetwork
Copy link

I am having an issue when running headless the user agent isn’t respected.

placed in settings, in spider, & in headers , works but sniffing the request shows headless/Chrome seems to always be detected and used

@Gallaecio
Copy link
Contributor

@scrapenetwork What is the user-agent header sent to the server? This topic is about the header sent, not how other aspects of Playwright may be used to detect the user agent as being a headless browser despite the user agent header.

@scrapenetwork
Copy link

The Headless/chrome.
understood, appreciate the response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants