Created
August 2, 2018 23:39
-
-
Save musoftware/1f96a637bb3c13758ed07c6d9677f35d to your computer and use it in GitHub Desktop.
Get Multi Request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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