摘要:
import cookielib,urllib2class AddCookieHandler(urllib2.BaseHandler): def __init__(self,cookieValue): self.cookieValue = cookieValue def http_request(self, req): if not req.has_header('Cookie'): req.add_unredirected_header('Cookie', self.cookieValue) else: ... 阅读全文