潇洒郎: cUrl(bash) 自动转换为python代码并执行

示例


cUrl = '''curl 'https://openapi.lddgo.net/base/gtool/api/v1/note/QueryPublicAllNote' \
  -H 'authority: openapi.lddgo.net' \
  -H 'accept: application/json, text/javascript, */*; q=0.01' \
  -H 'accept-language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6' \
  -H 'content-type: application/json;charset=UTF-8' \
  -H 'origin: https://www.lddgo.net' \
  -H 'referer: https://www.lddgo.net/' \
  -H 'sec-ch-ua: "Microsoft Edge";v="119", "Chromium";v="119", "Not?A_Brand";v="24"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Windows"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-site' \
  -H 'user-agent: Mozilla/5.0 (Wi

你可能感兴趣的:(Python学习,bash,python,开发语言)