create a fake useragent
Project description
# my-fake-useragent
generate your random fake useragent.
## TODO
version_ranget filter
## description:
create your fake useragent
## install
python setup.py install
or
pip install my_fake_useragent
## usage
```python
from my_fake_useragent import UserAgent
ua = UserAgent(family='chrome')
res = ua.random()
```
### family参数可用:
可以设置列表还匹配多种情况
- chrome
- firefox
- edge
- ie
- opera
- safari
### os_family参数可用:
可以设置列表还匹配多种情况
- android
- windows
- linux
- mac
- ios
- chrome os
### phone参数可用:
- None 不过滤
- True 要求是移动端
- False 要求不是移动端
移动端的判据如下:
如果device family检测到:
```python
[
'BlackBerry',
'BlackBerry 9700',
'BlackBerry 9800',
'Generic Feature Phone',
'Generic Smartphone',
'Generic Tablet',
'HTC Desire',
'HTC DesireHD A9191',
'HTC DesireS S510e',
'HTC DesireZ A7272',
'HTC HD2_T8585',
'HTC IncredibleS S710e',
'HTC Legend',
'HTC P715a',
'HTC Pyramid',
'HTC Sensation',
'HTC Vision',
'LG-L160L',
'LG-LU3000',
'LG-P505R',
'Nintendo Wii',
'Nokia 2730c-1',
'SprintPPC-6700',
'SprintPPC-6700)',
'SprintPPC-i830',
'SprintSCH-i320',
'SprintSCH-i830',
'SprintSPH-ip320',
'SprintSPH-ip830w',
'T-Mobile myTouch 3G Slide',
'iPad',
'iPhone',
'iPod']
```
则认为是移动端,同时还补充 认为 android操作系统和ios操作系统也是移动端。
一个符合过滤例子如下:
要求 linux操作系统的的chrome 浏览器:
```python
from my_fake_useragent import UserAgent
ua = UserAgent(family='chrome', os_family='linux')
```
## CHANGELOG
### 0.1.1
this module does not need any third module at all.
### 0.1.0
init
generate your random fake useragent.
## TODO
version_ranget filter
## description:
create your fake useragent
## install
python setup.py install
or
pip install my_fake_useragent
## usage
```python
from my_fake_useragent import UserAgent
ua = UserAgent(family='chrome')
res = ua.random()
```
### family参数可用:
可以设置列表还匹配多种情况
- chrome
- firefox
- edge
- ie
- opera
- safari
### os_family参数可用:
可以设置列表还匹配多种情况
- android
- windows
- linux
- mac
- ios
- chrome os
### phone参数可用:
- None 不过滤
- True 要求是移动端
- False 要求不是移动端
移动端的判据如下:
如果device family检测到:
```python
[
'BlackBerry',
'BlackBerry 9700',
'BlackBerry 9800',
'Generic Feature Phone',
'Generic Smartphone',
'Generic Tablet',
'HTC Desire',
'HTC DesireHD A9191',
'HTC DesireS S510e',
'HTC DesireZ A7272',
'HTC HD2_T8585',
'HTC IncredibleS S710e',
'HTC Legend',
'HTC P715a',
'HTC Pyramid',
'HTC Sensation',
'HTC Vision',
'LG-L160L',
'LG-LU3000',
'LG-P505R',
'Nintendo Wii',
'Nokia 2730c-1',
'SprintPPC-6700',
'SprintPPC-6700)',
'SprintPPC-i830',
'SprintSCH-i320',
'SprintSCH-i830',
'SprintSPH-ip320',
'SprintSPH-ip830w',
'T-Mobile myTouch 3G Slide',
'iPad',
'iPhone',
'iPod']
```
则认为是移动端,同时还补充 认为 android操作系统和ios操作系统也是移动端。
一个符合过滤例子如下:
要求 linux操作系统的的chrome 浏览器:
```python
from my_fake_useragent import UserAgent
ua = UserAgent(family='chrome', os_family='linux')
```
## CHANGELOG
### 0.1.1
this module does not need any third module at all.
### 0.1.0
init
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
my_fake_useragent-0.1.1.tar.gz
(272.3 kB
view details)
Built Distribution
File details
Details for the file my_fake_useragent-0.1.1.tar.gz
.
File metadata
- Download URL: my_fake_useragent-0.1.1.tar.gz
- Upload date:
- Size: 272.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 994025ef143a323d56be9bc98be75cd98300a829e9199c1d935a616b6b874137 |
|
MD5 | 19ed572f0f8211cd64dabcfb69cda56c |
|
BLAKE2b-256 | dad0f747f79fd56fc3e3a723c71e379bb06260d80b25fef8d0d686bccc7127e8 |
File details
Details for the file my_fake_useragent-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: my_fake_useragent-0.1.1-py3-none-any.whl
- Upload date:
- Size: 299.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f4184ac5bad8b84d3d3dcf23402939ddae2ec158a83ae9355a41d40b927061e |
|
MD5 | 5a2991f0cf51827989070eafc9f7dd5e |
|
BLAKE2b-256 | 1cd99cabeff987e6a9579f3f286d39c87a71253c186b7e58f6a1e938daf4edde |