Skip to content

Instantly share code, notes, and snippets.

@etscrivner
Created September 24, 2014 00:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save etscrivner/39167327cba3b39b65d3 to your computer and use it in GitHub Desktop.
Save etscrivner/39167327cba3b39b65d3 to your computer and use it in GitHub Desktop.
Querying google without gevent
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