🚀
hrequests
  • Home
  • Installation
  • Simple Usage
    • Attributes
  • Sessions
    • Attributes
  • Concurrent & Lazy Requests
    • Nohup Requests
    • Easy Concurrency
    • Grequests-style Concurrency
  • HTML Parsing
  • Browser Automation
    • Interaction
    • Firefox addons
    • Requests & Responses
    • Closing the page
Powered by GitBook
On this page
  1. Concurrent & Lazy Requests

Easy Concurrency

Passing an array of links

PreviousNohup RequestsNextGrequests-style Concurrency

Last updated 1 year ago

You can pass an array/iterator of links to the request methods to send them concurrently:

>>> hrequests.get(['https://google.com/', 'https://github.com/'])
(<Response [200]>, <Response [200]>)

This wraps around .


This also works with nohup:

>>> resps = hrequests.get(['https://google.com/', 'https://github.com/'], nohup=True)
>>> resps
(<LazyResponse[Pending]>, <LazyResponse[Pending]>)
>>> # Sometime later...
>>> resps
(<Response [200]>, <Response [200]>)
hrequests.map