Amazon metadata download: Update plugin for website changes to Amazon Brazil. Fixes #1420629 [Amazon.br metadata source, error with accents](https://bugs.launchpad.net/calibre/+bug/1420629)

This commit is contained in:
Kovid Goyal 2015-02-11 12:41:22 +05:30
parent 22f386303d
commit 96bc19e652

View File

@ -240,6 +240,8 @@ class Worker(Thread): # Get details {{{
return return
oraw = raw oraw = raw
if 'amazon.com.br' in self.url:
raw = raw.decode('utf-8') # amazon.com.br serves utf-8 but has an incorrect latin1 <meta> tag
raw = xml_to_unicode(raw, strip_encoding_pats=True, raw = xml_to_unicode(raw, strip_encoding_pats=True,
resolve_entities=True)[0] resolve_entities=True)[0]
if '<title>404 - ' in raw: if '<title>404 - ' in raw: