Generate Python code to recreate a request from your browser.
- Creating a foundation for an API wrapper
- Recreating a request outside the browser
- Testing what cookies or headers are required for a server to understand your request
- Inspect Element
- Go to
Network
tab - Find web request
- Right-Click
- Copy
- Choose one of the following:
- Powershell
- Node.js fetch
install the package with pip
$ pip install autorequests
or download the latest development build from GitHub
$ pip install -U git+https://github.com/Hexiro/autorequests
$ autorequests --help
Meta Options
--file -f Optional file to read input from.
--copy -c Copy the output to the clipboard
Generation options
-sync/--async -s/-a Generate synchronous or asynchronous code.
--httpx -h Use httpx library to make requests.
--no-headers -nh Don't include headers in the generated output.
--no-cookies -nc Don't include cookies in the generated output.
see CONTRIBUTING.md