安装
pip install fake-useragent
使用
from fake_useragent import UserAgent
ua = UserAgent()
#print(ua.chrome)
headers= {'User-Agent':ua.random}
r = requests.get(url, proxies=proxies, headers=headers, timeout=10)
安装
pip install fake-useragent
使用
from fake_useragent import UserAgent
ua = UserAgent()
#print(ua.chrome)
headers= {'User-Agent':ua.random}
r = requests.get(url, proxies=proxies, headers=headers, timeout=10)