Skip to content

Instantly share code, notes, and snippets.

@musoftware
Created August 2, 2018 23:39
Show Gist options
  • Save musoftware/1f96a637bb3c13758ed07c6d9677f35d to your computer and use it in GitHub Desktop.
Save musoftware/1f96a637bb3c13758ed07c6d9677f35d to your computer and use it in GitHub Desktop.
Get Multi Request
import grequests
urls = [
'https://graph.facebook.com/',
'https://graph.facebook.com/2',
]
rs = (grequests.get(u) for u in urls)
p = grequests.map(rs)
for o in p:
if o is not None:
print(o.content)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment