cj = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
opener.open('http://abc.com')
opener.open('http://google.com')
As you can see, I use opener to visit different websites, using a cookie jar. Can I set a header so that each time a website is it, the header is applied?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…