比如,进入msdn后随意选中一项分类,会产生一条请求,在浏览器开发者工具中, network 中的 xmr分类里可以看到相关请求,右键 ccopy as curl 即可 获取一下格式的数据:
[PowerShell] 纯文本查看 复制代码 curl 'https://msdn.itellyou.cn/Category/Index' -H 'Connection: keep-alive' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' -H 'Accept: */*' -H 'Sec-Fetch-Dest: empty' -H 'X-Requested-With: XMLHttpRequest' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Origin: [url]https://msdn.itellyou.cn[/url]' -H 'Sec-Fetch-Site: same-origin' -H 'Sec-Fetch-Mode: cors' -H 'Referer: [url]https://msdn.itellyou.cn/'[/url] -H 'Accept-Language: zh-CN,zh;q=0.9' --data 'id=fcf12b78-0662-4dd4-9a82-72040db91c9e' --compressed |