Hulu command help

This commit is contained in:
Steven Smith 2013-09-03 19:41:53 +08:00
parent 9fadc40d97
commit bc0eb32d9b

View file

@ -15,6 +15,7 @@ def hulu_url(match):
@hook.command('hulu') @hook.command('hulu')
def hulu_search(inp): def hulu_search(inp):
"""hulu <search> - Search Hulu"""
result = http.get_soup("http://m.hulu.com/search?dp_identifier=hulu&{}&items_per_page=1&page=1".format(urlencode({'query': inp}))) result = http.get_soup("http://m.hulu.com/search?dp_identifier=hulu&{}&items_per_page=1&page=1".format(urlencode({'query': inp})))
data = result.find('results').find('videos').find('video') data = result.find('results').find('videos').find('video')
showname = data.find('show').find('name').text showname = data.find('show').find('name').text