metacritic: Resets PSV to VITA, added XONE and PS4, changes score class check from metascore to metascore_w
This commit is contained in:
parent
8401ec50bf
commit
793f09b63e
|
@ -8,14 +8,14 @@ from util import hook, http
|
||||||
|
|
||||||
@hook.command('mc')
|
@hook.command('mc')
|
||||||
def metacritic(inp):
|
def metacritic(inp):
|
||||||
'.mc [all|movie|tv|album|x360|ps3|pc|ds|3ds|wii|psv] <title> -- gets rating for'\
|
'.mc [all|movie|tv|album|x360|ps3|pc|gba|ds|3ds|wii|vita|wiiu|xone|ps4] <title> -- gets rating for'\
|
||||||
' <title> from metacritic on the specified medium'
|
' <title> from metacritic on the specified medium'
|
||||||
|
|
||||||
# if the results suck, it's metacritic's fault
|
# if the results suck, it's metacritic's fault
|
||||||
|
|
||||||
args = inp.strip()
|
args = inp.strip()
|
||||||
|
|
||||||
game_platforms = ('x360', 'ps3', 'pc', 'ds', 'wii', '3ds', 'gba', 'psv')
|
game_platforms = ('x360', 'ps3', 'pc', 'gba', 'ds', '3ds', 'wii', 'vita', 'wiiu', 'xone', 'ps4')
|
||||||
all_platforms = game_platforms + ('all', 'movie', 'tv', 'album')
|
all_platforms = game_platforms + ('all', 'movie', 'tv', 'album')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -125,7 +125,7 @@ def metacritic(inp):
|
||||||
release = None
|
release = None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
score = result.find_class('metascore')[0].text_content()
|
score = result.find_class('metascore_w')[0].text_content()
|
||||||
except IndexError:
|
except IndexError:
|
||||||
score = None
|
score = None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue