Skip to main content

bash curl transfer to requests

Project description

curl2req

把浏览器请求转换为 requests 请求的工具

用法

1 打开浏览器F12,右键 Copy -> Copy as cURL (bash) 2 把请求保存到文件,例如 .curl 3 运行命令

from curl2req import curl_to_req

curl_to_req('./.curl', "", ".res", output_file_prefix="samples-res-")

4 查看结果 vim .res/samples-res-xxx.json

5 查看 json 结构

from curl2req import get_json_paths

get_json_paths('.res/samples-res-xxx.json')

上传

pip install build
rm -rf dist/* && python -m build
twine upload dist/*

pip install -e .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

curl2req-0.1.7.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

curl2req-0.1.7-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file curl2req-0.1.7.tar.gz.

File metadata

  • Download URL: curl2req-0.1.7.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for curl2req-0.1.7.tar.gz
Algorithm Hash digest
SHA256 9dde434ceb9c0d12b54bc87d11d5a981ce0682994ee7193dc07f5cdd65748aa8
MD5 d44713fde62c01bd8c25199023089b69
BLAKE2b-256 156a80ae87f6c41bc69c0c3902473d96256b05526db018b6d1f23bc323eb2501

See more details on using hashes here.

File details

Details for the file curl2req-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: curl2req-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for curl2req-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 775c68661c0db9a4884c52f7cb5a7496902859acdd25b8e87b104da7c6d3d42b
MD5 b691e7a061141322158ae8f21477123b
BLAKE2b-256 c0fd97a78614a16b0146ab840e3b49e90ff15753c9ce184c3e527f295c3ec537

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page