Randomizes the user agent, along with default headers found with that browser as well as the cipher suite used.
Project description
Python Requests – Anonymous Session
Randomizes the user agent, and applies the default headers and cipher suite found in that browser.
Installation
pip install python-requests-anonymous-session
Useage
Note: AnonymousSession
inherits from requests.Session
.
Simple
from python_requests_anonymous_session import AnonymousSession
session = AnonymousSession()
Advanced
Choose wether you want to use mobile/desktop broswer profiles
session = AnonymousSession(browser={
'desktop': False, # default True,
'mobile': True, # default True,
})
Slightly More Advanced
Choose which user-agent
you want. If the user-agent
is in found in our database the correct default headers
and cipher suite will be applied.
session = AnonymousSession(browser={
'custom': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148',
})
Credits
- VeNoMouS/cloudscraper for the browsers.json
file and the original
UserAgent
andCipherSuiteAdapter
implementations.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for python-requests-anonymous-session-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6167534f4124a4f5e820b7fc1ba51c0d91390ac0c0fc3915971ae0d1acb0a49f |
|
MD5 | 28993e898d6f757bef74d01267135d08 |
|
BLAKE2b-256 | 47822e9b78f1659c2552d6feec88cf260f930551030f5b885dbe9d6bdd75fc81 |