scarpy user agent code example
Example 1: scrapy user agent
#add this lines into settings.py
DOWNLOADER_MIDDLEWARES = {
'scrapy.downloadermiddlewares.useragent.UserAgentMiddleware': None,
'scrapy_user_agents.middlewares.RandomUserAgentMiddleware': 400,
}
Example 2: how to install scrapy-user agents
pip install scrapy-useragents