Loading

python浏览器原始header转换为dict类型

def headers_to_dict(raw_headers):
    """header转换为字典"""
    return dict([k.strip() for k in i.split(": ", 1)] for i in raw_headers.split('\n'))

posted @ 2020-08-22 17:29  随风挥手  阅读(482)  评论(0编辑  收藏  举报
群1
299524235(满)
群2
362812191