This commit is contained in:
Kovid Goyal 2019-03-05 09:58:44 +05:30
parent 1f3c8a6ee4
commit 20ba5d597f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -83,6 +83,9 @@ def parse_details_page(url, log, timeout, browser, domain):
if domain == 'jp':
for a in root.xpath('//a[@href]'):
if 'black-curtain-redirect.html' in a.get('href'):
url = a.get('href')
if url:
if url.startswith('/'):
url = 'https://amazon.co.jp' + a.get('href')
log('Black curtain redirect found, following')
return parse_details_page(url, log, timeout, browser, domain)
@ -839,7 +842,7 @@ class Worker(Thread): # Get details {{{
class Amazon(Source):
name = 'Amazon.com'
version = (1, 2, 4)
version = (1, 2, 5)
minimum_calibre_version = (2, 82, 0)
description = _('Downloads metadata and covers from Amazon')