【发布时间】:2013-05-29 02:37:44
【问题描述】:
尝试从 Python 中的 HTTP 请求的 cookie 字符串中获取特定值。我相信可能使用requests 库或urllib2 会是一个好主意。
示例:
假设
headers['cookie'] = 'somekey=somevalue;someotherkey=someothervalue'
试图检索somekey 的值。
非常感谢!
【问题讨论】:
标签: python parsing http cookies request