Skip to main content

Check required data in a request.

Usage

Some time ago Chrome Developers tools added Copy as Curl feature. This tool receives as input a curl command, parses it and checks what data is required to repeat the request successfully. It currently supports GET and POST requests.

The output depends on the action, which are currently print_results and print_scrapy_request. An example using the latest one is shown below:

$ python minreq-runner.py --action print_scrapy_request
curl 'https://en.wikipedia.org/w/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=vector&*'
-H 'accept-encoding: gzip, deflate, sdch' -H 'accept-language: en-US,en;q=0.8,es;q=0.6'
-H 'user-agent: Mozilla/5.0' -H 'accept: */*' -H 'referer: https://en.wikipedia.org/wiki/Example'
-H 'cookie: GeoIP=:::::v6; WMF-Last-Access=23-Jun-2015' --compressed


Scrapy request
--------------


from scrapy.http import Request

return Request(
    url='https://en.wikipedia.org/w/load.php?only=scripts&modules=startup',
    cookies={},
    headers={},
    callback='method'
)

History

0.1.0 (2015-11-05)

  • First release on PyPI.

Metadata

Release files for minreq 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for minreq 0.1.0
File Size Uploaded
minreq-0.1.0.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for minreq 0.1.0
File Interpreter ABI Platform
minreq-0.1.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 14.0 kB

Release files / minreq-0.1.0.tar.gz

Download URL minreq-0.1.0.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
73222fc91a30bea333e5d2e66f46ff0b6c562650cf183d7471a12d0fbd307473
BLAKE2b-256 checksum
How to use checksums
58f2db7be8245db63638ca7d0c24d7c3c1a16b8ca972dafbcbf85c05a438168d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / minreq-0.1.0-py2.py3-none-any.whl

Download URL minreq-0.1.0-py2.py3-none-any.whl
Size 8.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
254f987871379036da0befadf731df5740c45df4a32117a69bed41f5a32e02d4
BLAKE2b-256 checksum
How to use checksums
c30500db0582425c5cc55547a38b1cebb9790b2404098e9fb1e0ec911b2edd7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page