Python爬虫伪造UA字符串 安装 pip install fake-useragent 使用: from fake_useragent import UserAgent ua=UserAgent() # 随机生成UserAgent() print(ua.random)