import urllib.request as ur
re=ur.urlopen('http://192.168.1.105/exp/cookie/test.php')
for i in re.getheaders():
if i[0]=='Set-Cookie':
print (i[1].split(';')[0])
手动实现cookie 的python3代码
最新推荐文章于 2024-08-15 01:55:01 发布
import urllib.request as ur
re=ur.urlopen('http://192.168.1.105/exp/cookie/test.php')
for i in re.getheaders():
if i[0]=='Set-Cookie':
print (i[1].split(';')[0])