shadow-useragent
shadow-useragent gives you access to the most commonly used UserAgents on the Internet, safe from outdated data.
Behold, the power of UserAgent:
>>> import shadow_useragent
>>> ua = shadow_useragent.ShadowUserAgent()
>>> ua.percent(0.05)
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15'
>>> ua.most_common
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36'
When you use our library, we register your User Agent, and update the frequency of use. The percent of use is thus dynamically updated, and never outdated. No more unused header that reveals your true identity, you are protected by the group.
Besides, you can rely on traditional features, like picking an header from outstanding IE browser family.
Feature Support
shadow-useragent is the only safe, and updated user-agent package.
- UserAgent Percentage of Use
- Day-to-day Update
- Exhaustive UserAgents Family
- Elegant @property Methods
- Community-Based Package
shadow-useragent supports Python 2.7 & 3.4–3.7, and runs great on PyPy.
Installation
To install shadow-useragent, simply use pipenv (or pip, of course):
$ pip install shadow-useragent
👻
Never disappointed.
Documentation
Documentation is not available for now. Unlimited delivery coming soon.
Usage
import shadow_useragent
ua = shadow_useragent.ShadowUserAgent()
# Access user-agent per Percentage of Use
ua = ua.percent(0.03)
ua = ua.most_common
# Access user-agent per Browser Family
ua = ua.firefox
ua = ua.chrome
ua = ua.safari
ua = ua.edge
ua = ua.ie
ua = ua.android
ua = ua.ipad
# Random Access ;)
ua = ua.random
ua = ua.random_nomobile # Mobile-UA excluded
# If you want an Exhaustive list, you can play with
uas = ua.get_uas()
uas = ua.get_sorted_uas() # Sorted List per Percentage of Use
>>> uas[0]
{
'id':1,
'scraping_time':'2019-07-31T17:05:15Z',
'percent':9.6,
'useragent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36',
'system':'Chrome 75.0 Win10',
'browser_family':'Chrome',
'browser_version_string':'75.0.3770',
'os_family':'Windows',
'os_version_string':'10',
'device_family':'Other',
'device_brand':None,
'device_model':None
}
Notes
shadow-useragent stores collected UAs in the folder of your pip packages: site-packages/shadow_useragent/data.
The UserAgents' list is automatically updated with a shadow call (mm) to the shadow-useragent API every 24 hours. If you want to force the update :
from shadow_useragent import ShadowUserAgent
shadow_useragent = ShadowUserAgent()
shadow_useragent.force_update()
Metadata
Release files for shadow-useragent 0.0.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| shadow-useragent-0.0.17.tar.gz | 11.0 kB | Without provenance | Details for shadow-useragent-0.0.17.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shadow_useragent-0.0.17-py3-none-any.whl | Python 3 | none | any | Details for shadow_useragent-0.0.17-py3-none-any.whl |
Total release size: 22.1 kB
Release files / shadow-useragent-0.0.17.tar.gz
| Download URL | shadow-useragent-0.0.17.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ace3f53c0ec697b36eb35bb04ccc04d4727bf924edd5bf7caad78b64d272d755
|
|
BLAKE2b-256 checksum How to use checksums |
217311d4b946093ea19ca23b4fdb222778faba6bfbe018d1c93700ca5bc06eb5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
|
Release files / shadow_useragent-0.0.17-py3-none-any.whl
| Download URL | shadow_useragent-0.0.17-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3061970e45587528516ed0c3f9919bcc8a6d38eadeb4b0388c56984e7c98f77d
|
|
BLAKE2b-256 checksum How to use checksums |
2ce0c63f4a73e5a2832c1ec1475e6e23d2be136dfda409863fa5fc70c3c3707d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
|
Security for shadow-useragent 0.0.17
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.