大家好,我想知道如何从网页获取 DOM !所以看看这个 Example.com>Get Dom>Get Document from Dom > Get Cookie Values from Document
我试过这段代码但没有工作
response.urllib2.urlopen('http://Example.com')
print response.info().getheader("cookie")
我也试过打印response.read()
但它的输出为 Noneprint response.info().getheader("cookie")
我试过Set-Cookie
我得到了值,但从 broswer 不完全相同!我通过网络文本编辑器(Firebug)打开网络,我得到了不同的信息,所以我很困惑 Set-Cookie 是否等于 cookie 我不知道请给我一些建议