📜  scrapy 用户代理 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:12.493000             🧑  作者: Mango

代码示例1
#add this lines into settings.py
DOWNLOADER_MIDDLEWARES = {
    'scrapy.downloadermiddlewares.useragent.UserAgentMiddleware': None,
    'scrapy_user_agents.middlewares.RandomUserAgentMiddleware': 400,
}