简单粗暴,直接复制到内容,运行就行
小缺点:运行出来的请求头里面可能有双引号引起来的,比如sec-ch-ua,会报错,手动改一下,改成单引号,完美解决
import json
headers = """
authority: www.xiaohongshu.com
method: GET
path: /discovery/item/619df492000000002103712e
scheme: https
accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
accept-encoding: gzip, deflate, br
accept-language: zh-CN,zh;q=0.9,en;q=0.8,ru;q=0.7
cache-control: max-age=0
cookie: customerClientId=575642782579767; xhsTrackerId=f2d4fb13-5552-40f2-c085-503faeeaccb7; extra_exp_ids=commentshow_clt1,gif_exp1,ques_clt2; xhsTracker=url=index&searchengine=baidu; timestamp2=20220223321b8