Reformatted drama.py
This commit is contained in:
parent
e8587da2e5
commit
881c64f75d
1 changed files with 1 additions and 5 deletions
|
@ -1,6 +1,3 @@
|
||||||
'''Searches Encyclopedia Dramatica and returns the first paragraph of the
|
|
||||||
article'''
|
|
||||||
|
|
||||||
from util import hook, http
|
from util import hook, http
|
||||||
|
|
||||||
api_url = "http://encyclopediadramatica.ch/api.php?action=opensearch"
|
api_url = "http://encyclopediadramatica.ch/api.php?action=opensearch"
|
||||||
|
@ -10,8 +7,7 @@ ed_url = "http://encyclopediadramatica.ch/"
|
||||||
@hook.command('ed')
|
@hook.command('ed')
|
||||||
@hook.command
|
@hook.command
|
||||||
def drama(inp):
|
def drama(inp):
|
||||||
'''.drama <phrase> -- gets first paragraph of Encyclopedia Dramatica ''' \
|
".drama <phrase> -- gets first paragraph of Encyclopedia Dramatica article on <phrase>"
|
||||||
'''article on <phrase>'''
|
|
||||||
|
|
||||||
j = http.get_json(api_url, search=inp)
|
j = http.get_json(api_url, search=inp)
|
||||||
if not j[1]:
|
if not j[1]:
|
||||||
|
|
Reference in a new issue