或者,您可以在请求之前和之后使用
requests.Session和观察
cookies:
>>> import requests>>> session = requests.Session()>>> print(session.cookies.get_dict()){}>>> response = session.get('http://google.com')>>> print(session.cookies.get_dict()){'PREF': 'ID=5514c728c9215a9a:FF=0:TM=1406958091:LM=1406958091:S=KfAG0U9jYhrB0XNf', 'NID': '67=TVMYiq2wLMNvJi5SiaONeIQVNqxSc2RAwVrCnuYgTQYAHIZAGESHHPL0xsyM9EMpluLDQgaj3db_V37NjvshV-eoQdA8u43M8UwHMqZdL-S2gjho8j0-Fe1XuH5wYr9v'}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)