transfer-headers,转换请求头
这两天趁有时间浅学了一下易语言,之前一直用python
写工具,但python
写启动软件慢,而且编译文件太大,
易语言学的很浅,用中文写很不习惯,==
因为经常做爬虫,经常要把请求头转换到python
/代码里,每次做重复工作浪费时间,就自己写了这么个小工具,
有的人会说,转换成、curl
,但 比如fiddler
不支持,并且有的站转换会出错,
比如说
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9
Cache-Control: no-cache
Connection: keep-alive
Cookie: HMACCOUNT=5B8D64B596; HMACCOUNT_BFESS=5B8D65AEAAAA-peeRytO957XEvqHNt7XItP0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAxY3GAMWNxgWX;__yjl_duid=1_400fa6f67541a851a327
DNT: 1
Host: hm.baidu.com
Pragma: no-cache
Referer: https://www.iloveyou.cn/forum.php
Sec-Fetch-Dest: script
Sec-Fetch-Mode: no-cors
Sec-Fetch-Site: cross-site
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.3987.87 Safari/5737.36 SE 2.X MetaSr 51.0
'Accept':'*/*',
'Accept-Encoding':'gzip,deflate,br',
'Accept-Language':'zh-CN,zh;q=0.9',
'Cache-Control':'no-cache',
'Connection':'keep-alive',
'Cookie':'HMACCOUNT=5B8D64B596;HMACCOUNT_BFESS=5B8D65AEAAAA-peeRytO957XEvqHNt7XItP0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAxY3GAMWNxgWX;__yjl_duid=1_400fa6f67541a851a327',
'DNT':'1',
'Host':'hm.baidu.com',
'Pragma':'no-cache',
'Referer':'https://www.iloveyou.cn/forum.php',
'Sec-Fetch-Dest':'script',
'Sec-Fetch-Mode':'no-cors',
'Sec-Fetch-Site':'cross-site',
'User-Agent':'Mozilla/5.0(WindowsNT10.0;WOW64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/89.0.3987.87Safari/5737.36SE2.XMetaSr51.0',
headers = {
'Accept': '*/*',
'Accept-Encoding': 'gzip,deflate,br',
'Accept-Language': 'zh-CN,zh;q=0.9',
'Cache-Control': 'no-cache',
'Connection': 'keep-alive',
'Cookie': 'HMACCOUNT=5B8D64B596;HMACCOUNT_BFESS=5B8D65AEAAAA-peeRytO957XEvqHNt7XItP0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAxY3GAMWNxgWX;__yjl_duid=1_400fa6f67541a851a327',
'DNT': '1',
'Host': 'hm.baidu.com',
'Pragma': 'no-cache',
'Referer': 'https://www.iloveyou.cn/forum.php',
'Sec-Fetch-Dest': 'script',
'Sec-Fetch-Mode': 'no-cors',
'Sec-Fetch-Site': 'cross-site',
'User-Agent': 'Mozilla/5.0(WindowsNT10.0;WOW64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/89.0.3987.87Safari/5737.36SE2.XMetaSr51.0',
}
支持上下框同步浏览
一键复制,及清空
下面分享一下软件:蓝揍 源码:source code