爬虫
Bi_1ngram4
这个作者很懒,什么都没留下…
展开
-
Scrapy中使用fake_useragent
pip install fake-useragent middlewares.py: from fake_useragent import UserAgent ua = UserAgent() from fake_useragent import UserAgent class RandomUAMiddleware(object): def process_request(self,re...转载 2020-04-18 19:18:29 · 758 阅读 · 1 评论 -
模拟登录
请求时携带Cookies def start_requests(self): # 请求时携带Cookies cookies = '_uuid=AF1BDDAC-262D-B735-E263-8B18B08AA29127233infoc; buvid3=4AF29BB0-2171-4B3D-ABCC-9B3CE12D3CA9190968infoc; LIVE_BUVID=AUTO72156...原创 2019-11-12 11:00:58 · 688 阅读 · 0 评论