爬虫
月尽天明_
请多指教!
展开
-
使用本地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 · 613 阅读 · 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 · 4353 阅读 · 11 评论