Created
May 14, 2015 13:38
-
-
Save pathcl/d1cb9430d08904a42ec5 to your computer and use it in GitHub Desktop.
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
tarro$ cat google-scan.py | |
#!/usr/bin/env python | |
import re | |
import sys | |
import google | |
import urllib2 | |
if len(sys.argv) < 2: | |
print sys.argv[0] + ": <dict>" | |
sys.exit(1) | |
fh = open(sys.argv[1]) | |
for word in fh.readlines(): | |
print "\nSearching for " + word.strip() | |
results = google.search(word.strip()) | |
try: | |
for link in results: | |
if re.search("youtube", link) == None: print link | |
except KeyError: | |
pass | |
except urllib2.HTTPError, e: | |
print "Google search failed: " + str(e) | |
tarro $ cat text | |
intitle:''index.of'' python [pdf] | |
tarro $ ./google-scan.py text | |
Searching for intitle:''index.of'' python [pdf] | |
http://slav0nic.org.ua/static/books/python/ | |
http://misc.crashdump.fr/eBooks/python/ | |
http://meh.dustri.org/Programming/ | |
http://kysmykseka.net/koti/wizardry/Programming/Python/ | |
http://www.jeapedu.com/python-ebook/ | |
http://www.mmnt.net/db/0/0/www.mans.edu.eg/Learn/Python/pdf | |
https://pypi.python.org/pypi?%3Aaction=search&term=pdf&submit=search | |
http://www.sistemas.ith.mx/raymundo/python/ | |
http://kolos.math.uni.lodz.pl/~archive/Inne%20-%20Python/ | |
http://swilliams.ca/python-tutorials/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment