clean up metacritic error messages
This commit is contained in:
parent
9a408433b9
commit
2b34878441
|
@ -32,8 +32,8 @@ def metacritic(inp):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
doc = http.get_html(url)
|
doc = http.get_html(url)
|
||||||
except HTTPError, e:
|
except HTTPError:
|
||||||
return 'fetch returned error %d' % e.code
|
return 'error fetching results'
|
||||||
|
|
||||||
''' result format:
|
''' result format:
|
||||||
-- game result, with score
|
-- game result, with score
|
||||||
|
@ -96,7 +96,7 @@ def metacritic(inp):
|
||||||
break
|
break
|
||||||
|
|
||||||
if not result:
|
if not result:
|
||||||
return 'could not fetch results'
|
return 'no results found'
|
||||||
|
|
||||||
# get the name, release date, and score from the result
|
# get the name, release date, and score from the result
|
||||||
name = result.find_class('product_title')[0].text_content()
|
name = result.find_class('product_title')[0].text_content()
|
||||||
|
|
Loading…
Reference in New Issue