This repository has been archived on 2023-04-13. You can view files and clone it, but cannot push or open issues or pull requests.
2012-09-04 21:52:03 +02:00
|
|
|
from util import hook, web, http
|
2012-08-27 14:22:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
@hook.command('gfy')
|
|
|
|
@hook.command
|
2013-09-04 12:30:04 +02:00
|
|
|
def lmgtfy(inp):
|
|
|
|
"""lmgtfy [phrase] - Posts a google link for the specified phrase"""
|
2012-08-27 14:22:03 +02:00
|
|
|
|
2013-09-27 10:48:01 +02:00
|
|
|
link = u"http://lmgtfy.com/?q={}".format(http.quote_plus(inp))
|
2012-10-13 01:10:02 +02:00
|
|
|
|
|
|
|
try:
|
|
|
|
return web.isgd(link)
|
|
|
|
except (web.ShortenError, http.HTTPError):
|
|
|
|
return link
|