Skip to content

Instantly share code, notes, and snippets.

@mushfiq
Created June 16, 2012 05:54
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 mushfiq/2940127 to your computer and use it in GitHub Desktop.
Save mushfiq/2940127 to your computer and use it in GitHub Desktop.
Sample google crawler
'''A sample google search script,you have to install python module "google before running it"'''
import sys
import time
from google import search
def do(keyword,stop):
count = 0
for url in search(keyword,lang='en',num=10,pause=3):
count +=1
print url
time.sleep(10)
if count == stop:
sys.exit("BYE BYE")
if __name__=='__main__':
do("euro cup",20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment