yggdrasil.http_.user_agents¶
user_agents ¶
BrowserProfile
dataclass
¶
A coherent browser request fingerprint: a User-Agent and the matching headers a real browser sends with it.
Use :attr:headers for a full browser-shaped request, or :attr:identity
to rotate only the who-am-I headers (leaving content negotiation alone).
UserAgentGenerator
dataclass
¶
Random (but plausible) User-Agent generator.
- Pure stdlib
- Deterministic if seed is provided
- Biases toward realistic modern UA shapes
- Avoids obviously fake combos (mostly)
- :meth:
random_profileemits a full set of headers consistent with the chosen UA (client hints, Accept, Sec-Fetch, language)
random_profile ¶
A :class:BrowserProfile: the UA plus headers consistent with it.
random_user_agent ¶
Convenience function
random_user_agent() -> random UA random_user_agent(seed=123) -> deterministic UA
random_browser_profile ¶
A random (or seeded) :class:BrowserProfile — UA plus consistent headers.
random_browser_headers ¶
The header dict of a random (or seeded) browser profile.