Created
September 24, 2014 00:57
-
-
Save etscrivner/39167327cba3b39b65d3 to your computer and use it in GitHub Desktop.
Querying google without gevent
This file contains 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 requests | |
def read_google(q): | |
return requests.get('https://www.google.com', params={'q': q}) | |
def bunch_of_requests(): | |
results = [] | |
for i in range(100): | |
results.append(read_google(i)) | |
return results | |
if __name__ == '__main__': | |
bunch_of_requests() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment