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

How to add new user agents ? #341

Open
pashkasan opened this issue Sep 2, 2021 · 1 comment
Open

How to add new user agents ? #341

pashkasan opened this issue Sep 2, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@pashkasan
Copy link

I would like to add the latest chrome user agents v91, v92, v93 and chrome based browsers like Yandex, Opera. But on first look seems like it very complicated, is there any instructions on this?

@blakebyrnes
Copy link
Contributor

Regarding Chromes: I'm going to integrate the latest chrome browser data in the near future. Just need to get to it.

For Other browsers or in interim:

Building a perfect emulator of those agents is going to be complicated, but you could "fork" the default-browser-emulator to do what you're talking about. There's some documentation, but you're likely going to have to look at the code.

Depending on if you want to run headless, you might also need to generate data to "polyfill" the headless versions of those browsers to look headed. With Chrome, the process is:

  1. Generate chrome browsers that don't auto-update (https://github.com/ulixee/hero/actions)
  2. Integrate into a BrowserEmulator that correctly launches each when a userAgentString is provided that requests them (see
    public static selectBrowserMeta(
    )
  3. Test that our Chrome devtools flow works with Yandex and Opera
  4. Optionally (best result): Analyze the the tls/headers/dom to determine anything that needs to be modified by your emulator at runtime (Test suites here: https://github.com/ulixee/double-agent/). You could use something like BrowserStack to generate your data.

@blakebyrnes blakebyrnes added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants