blob: 27128e15f6a66a5955090852721c97a19e6ab1e6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import urllib2
import simplejson
# This example request includes an optional API key which you will need to
words = open('/usr/share/dict/words').readlines()
for word in words:
word = word.rstrip()
url = ('http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q='+word+'+https&userip=67.169.84.240')
#print url
#print word.rstrip()
request = urllib2.Request(url, None, {'Referer': 'http://test.com'})
response = urllib2.urlopen(request)
results = simplejson.load(response)
for result in results['responseData']['results']:
print result['unescapedUrl']
|