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

Proposals for "navigate": ability to set a custom user agent and to execute a javascript in the page context #670

Open
maiux opened this issue Sep 8, 2021 · 2 comments

Comments

@maiux
Copy link

maiux commented Sep 8, 2021

I like this project, if you agree I think this two features will be an improvement, since some websites knock down the request when they spot an "*/headless" user agent.

I hope it will be easy to set a custom user agent and evaluate javascript in the _get_content() function of browser module using page.setUserAgent and page.evaluate method exposed.

I think also it will be a great addition using playwright as an alternative browser interface, since playwright IMHO has a much smoother experience handling automation and has a native python API

@thp
Copy link
Owner

thp commented Nov 7, 2021

Both suggestions sound fine to me, patches gladly accepted.

@fversaci
Copy link

fversaci commented Apr 7, 2022

In #700 I added an optional key for changing the useragent (but did nothing about the javascript evaluation).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants