This commit is contained in:
Ryan Hitchman 2009-04-28 22:10:11 -06:00
parent f0d61e61d9
commit e328ff1bbb
1 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,10 @@ import hook
@hook.command
def gis(inp):
'''.gis <term> -- returns first google image result (safesearch off)'''
if not inp:
return gis.__doc__
req_url = 'http://ajax.googleapis.com/ajax/services/search/images?' \
'v=1.0&safe=off&q='
url = req_url + urllib.quote(inp, safe='')