text = """
Accept:*/*
Accept-Encoding:gzip, deflate, br
Accept-Language:zh-CN,zh;q=0.9
Connection:keep-alive
Content-Length:51
Content-Type:application/x-www-form-urlencoded; charset=UTF-8
Cookie:_did=web_205909481A8B9441; isCloseVisit=false; sign_remind=1; did=H5_FfPrSNoWkMALtGX81ItlOHaatrfsU; did.sig=So9pY5zaR5TDoLVHaeJonVI_dv_LrhFDfvLPdHXDF6A; ac__avi=101055342091f15ea2eccc9b4bb28033e3881e7ea61b1002819658b692ccc65b40c5f089d7bf9e2350; ac_username=peimin1; ac_userimg=http%3A%2F%2Fcdn.aixifan.com%2Fdotnet%2F20120923%2Fstyle%2Fimage%2Favatar.jpg; XSRF-TOKEN=eyJpdiI6IkpnNFN4TjZjeGRkRnBzSnFOK0NHVGc9PSIsInZhbHVlIjoieWh3akpKNUsyRlQzaUExb0kxdElPTUR6K0tuU0J6XC9xMlFWazVYbXh2QjFtMDVyTVRFU2hKUXNhYUppaTJxTEh5UG50eldsU0g3VjNxbkRnNUtLa2lRPT0iLCJtYWMiOiI1Yjg3OGYyOWI3MDU4MTFmZmU0OTkwNDk2ZmFjMDgzMDY2MTA2NGVlZjNhYmM3ZDBlZTVhNzRlODYwOWNjZWFiIn0%3D; ap_session=eyJpdiI6InVlYXA0ZkpNR0UrbWFHTGNyRTBKWHc9PSIsInZhbHVlIjoib3p1OXlBYUNJcmJaOUc0WUl4VGxsSE8wNk1cL1VwbGFQb3ZZSUpxenZ6ekJMcVNCb0wxMTluOVJaZGFcL1o5cVkzcWpIODhNUnl5cXBISjhVRHdGeEpqZz09IiwibWFjIjoiMTA4MzQyMzQ4ZWE4YWEyYjljNGMxZGI5ODI4ZGNiOTgzMmIxMDFjYjA5MThlMzcyYzc4Yzc5NDUzYzc1ZDllOCJ9; Hm_lvt_2af69bc2b378fb58ae04ed2a04257ed1=1552394219,1552481007,1552565876,1552572881; Hm_lpvt_2af69bc2b378fb58ae04ed2a04257ed1=1552575772
Host:id.app.acfun.cn
Origin:http://www.acfun.cn
Referer:http://www.acfun.cn/login/?returnUrl=http%3A%2F%2Fwww.acfun.cn%2F
User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36
"""
import re
info = dict()
for i, j in re.findall('(.*?):(.*)\\n', text):
info[i] = j
print(info)
浏览器复制的headers头简易处理
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- (2017-11-19-周日 20:29:42) If you prefer to use other brows...