如何获取php脚本发送给浏览器的cookie?我发现:
Create a cookiejar to store cookie
self.cj = http.cookiejar.CookieJar()
# Create opener
self.opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(self.cj))
urllib.request.install_opener(self.opener)
仅适用于
self.opener.open(url)
???? 我需要存储类似的东西:
conn = http.client.HTTPConnection("myurl")
conn.request("POST", url, "data=test", headers)