tidying!
This commit is contained in:
parent
ada153c8bc
commit
ee0ad67a16
14 changed files with 24 additions and 50 deletions
|
@ -10,7 +10,7 @@ def hulu_url(match):
|
|||
data = http.get_json("http://www.hulu.com/api/oembed.json?url=http://www.hulu.com" + match.group(3))
|
||||
showname = data['title'].split("(")[-1].split(")")[0]
|
||||
title = data['title'].split(" (")[0]
|
||||
return "{}: {} - {}".format(showname, title, timeformat.timeformat(int(data['duration'])))
|
||||
return "{}: {} - {}".format(showname, title, timeformat.format_time(int(data['duration'])))
|
||||
|
||||
|
||||
@hook.command('hulu')
|
||||
|
@ -21,7 +21,7 @@ def hulu_search(inp):
|
|||
data = result.find('results').find('videos').find('video')
|
||||
showname = data.find('show').find('name').text
|
||||
title = data.find('title').text
|
||||
duration = timeformat.timeformat(int(float(data.find('duration').text)))
|
||||
duration = timeformat.format_time(int(float(data.find('duration').text)))
|
||||
description = data.find('description').text
|
||||
rating = data.find('content-rating').text
|
||||
return "{}: {} - {} - {} ({}) {}".format(showname, title, description, duration, rating,
|
||||
|
|
Reference in a new issue