mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1816391 [black-curtain-redirect not work](https://bugs.launchpad.net/calibre/+bug/1816391)
This commit is contained in:
parent
1f3c8a6ee4
commit
20ba5d597f
@ -83,9 +83,12 @@ def parse_details_page(url, log, timeout, browser, domain):
|
|||||||
if domain == 'jp':
|
if domain == 'jp':
|
||||||
for a in root.xpath('//a[@href]'):
|
for a in root.xpath('//a[@href]'):
|
||||||
if 'black-curtain-redirect.html' in a.get('href'):
|
if 'black-curtain-redirect.html' in a.get('href'):
|
||||||
url = 'https://amazon.co.jp' + a.get('href')
|
url = a.get('href')
|
||||||
log('Black curtain redirect found, following')
|
if url:
|
||||||
return parse_details_page(url, log, timeout, browser, domain)
|
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)
|
||||||
|
|
||||||
errmsg = root.xpath('//*[@id="errorMessage"]')
|
errmsg = root.xpath('//*[@id="errorMessage"]')
|
||||||
if errmsg:
|
if errmsg:
|
||||||
@ -839,7 +842,7 @@ class Worker(Thread): # Get details {{{
|
|||||||
class Amazon(Source):
|
class Amazon(Source):
|
||||||
|
|
||||||
name = 'Amazon.com'
|
name = 'Amazon.com'
|
||||||
version = (1, 2, 4)
|
version = (1, 2, 5)
|
||||||
minimum_calibre_version = (2, 82, 0)
|
minimum_calibre_version = (2, 82, 0)
|
||||||
description = _('Downloads metadata and covers from Amazon')
|
description = _('Downloads metadata and covers from Amazon')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user