Skip to content

Instantly share code, notes, and snippets.

@saurabh-hirani
Created March 17, 2019 14:34
Show Gist options
  • Select an option

  • Save saurabh-hirani/b08b8b3eb98432d786e4d6e712c0d4c9 to your computer and use it in GitHub Desktop.

Select an option

Save saurabh-hirani/b08b8b3eb98432d786e4d6e712c0d4c9 to your computer and use it in GitHub Desktop.
from __future__ import print_function
import grequests
url = "https://google.com"
url_count = 10
pending_requests = []
for i in range(url_count):
pending_requests.append(grequests.get(url, params={'page': i}))
all_responses = grequests.map(pending_requests)
print(all_responses)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment