ignore amazon utf-8 errors

This commit is contained in:
j 2015-03-09 16:43:33 +05:30
parent 32b31cd70c
commit 60ab6a5244

View file

@ -89,5 +89,5 @@ def lookup(id):
return r return r
def amazon_lookup(asin): def amazon_lookup(asin):
html = read_url('http://www.amazon.com/dp/%s' % asin).decode('utf-8') html = read_url('http://www.amazon.com/dp/%s' % asin).decode('utf-8', 'ignore')
return list(set(find_isbns(find_re(html, 'Formats</h3>.*?</table')))) return list(set(find_isbns(find_re(html, 'Formats</h3>.*?</table'))))