Python爬虫urllib模块之cookie的简单爬取 1.直接爬取(cookie显示在编译器中): import http.cookiejar,urllib.request cookie = http.cookiejar.CookieJar() # 声明CookieJar对象 handler = urllib.request.HTTPCookieProcessor(cookie) # 构建Handler opener