Randomly generates a useragent for fetching a web page without a browser.
Project description
Randomly generate a valid useragent for faking a browser behavior.
As a binary
fakeua # Get a useragent without specifying a browser name
fakeua [browser] # Get a useragent with a browser name (case insensitive)
fakeua [browser] --debug # Get a useragent in debug mode
fakeua [browser] --nocache # Get a useragent without using local cache
fakeua --remove # Remove cache from $HOME/.cache/fakeua
fakeua --version # Print the current version of the program
As a library
# Every time you run the script, the useragent value will be different.
# Supported browsers to choose from are: "chrome", "edge", "firefox", "safari", and "opera".
# For non-async caller:
from fake_user_agent import user_agent
ua = user_agent(browser=None, use_cache=True)
# For async caller:
from fake_user_agent import aio_user_agent
ua = await aio_user_agent(browser=None, use_cache=True)
# Remove cache:
from fake_user_agent import rm_cache
rm_cache()
Install & Uninstall
pip install fake_user_agent
pip uninstall -r requirements.txt -y
rm -rf $HOME/.cache/fakeua
# within the project
make install
make uninstall
make clean_cache
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
fake_user_agent-2.2.0.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for fake_user_agent-2.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fa67d6a33bc03375f8baea1809b8cf35542393568fdc83aa91b67df1fbc2253 |
|
MD5 | 97bf2529938c79128a59d9c3e7538f55 |
|
BLAKE2b-256 | 6cc5e914efc69d40d6dd432d8233aecb4eeb5e0232cce186337dfaf85bc3e01b |