imdb: ignore unknown fields. PEP8 rottentomatoes
This commit is contained in:
parent
61e07cc0ae
commit
bf7aeb07da
|
@ -14,8 +14,12 @@ def imdb(inp):
|
|||
elif content['Response'] == 'True':
|
||||
content['URL'] = 'http://www.imdb.com/title/%(ID)s' % content
|
||||
|
||||
return "\x02%(Title)s\x02 (%(Year)s) (%(Genre)s): %(Plot)s " \
|
||||
"\x02%(Runtime)s\x02. \x02%(Rating)s/10\x02 with " \
|
||||
"\x02%(Votes)s\x02 votes. %(URL)s" % content
|
||||
out = '\x02%(Title)s\x02 (%(Year)s) (%(Genre)s): %(Plot)s'
|
||||
if content['Runtime'] != 'N/A':
|
||||
out += ' \x02%(Runtime)s\x02.'
|
||||
if content['Rating'] != 'N/A' and content['Votes'] != 'N/A':
|
||||
out += ' \x02%(Rating)s/10\x02 with \x02%(Votes)s\x02 votes.'
|
||||
out += ' %(URL)s'
|
||||
return out % content
|
||||
else:
|
||||
return 'unknown error'
|
||||
|
|
|
@ -7,6 +7,7 @@ movie_reviews_url = api_root+'movies/%s/reviews.json?apikey=%s&review_type=all'
|
|||
|
||||
response = u"%s - critics: \x02%d%%\x02 (%d\u2191%d\u2193) audience: \x02%d%%\x02 - %s"
|
||||
|
||||
|
||||
@hook.command('rt')
|
||||
def rottentomatoes(inp, bot=None):
|
||||
'.rt <title> -- gets ratings for <title> from Rotten Tomatoes'
|
||||
|
|
Loading…
Reference in New Issue