|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 Mearten 于 2025-1-7 16:30 编辑
# 导入
from fake_useragent import UserAgent
ua = UserAgent().random
print(ua)
# 运行结果
Traceback (most recent call last):
File "D:/Download/Document/Project/My_project/03.爬虫/04.url传参.py", line 1, in <module>
from fake_useragent import UserAgent
File "D:\Software\Python\lib\site-packages\fake_useragent\__init__.py", line 4, in <module>
from fake_useragent.fake import FakeUserAgent, UserAgent
File "D:\Software\Python\lib\site-packages\fake_useragent\fake.py", line 8, in <module>
from fake_useragent.utils import BrowserUserAgentData, load
File "D:\Software\Python\lib\site-packages\fake_useragent\utils.py", line 42, in <module>
def load() -> list[BrowserUserAgentData]:
TypeError: 'type' object is not subscriptable |
|