![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
爬虫
月尽天明_
请多指教!
展开
-
使用本地cookie缓存,模拟访问
# python3import requestsimport osimport sqlite3from win32crypt import CryptUnprotectData# cookies存放路径cookie_path = os.environ['LOCALAPPDATA'] + r"\Google\Chrome\User Data\Default\Cookies"# 获取cooki原创 2017-09-28 19:55:50 · 641 阅读 · 0 评论 -
fake_useragent 实例化对象时报错
import fake_useragent# 实例化对象时报错ua = fake_useragent.UserAgent()socket.timeout: timed outDuring handling of the above exception, another exception occurred:Traceback (most recent call last): ...原创 2018-12-11 11:16:53 · 4387 阅读 · 11 评论