mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Amazon metadata download: Add support for amazon.in country website
This commit is contained in:
parent
e3cb9df046
commit
6c4a979058
@ -971,7 +971,7 @@ class Worker(Thread): # Get details {{{
|
|||||||
class Amazon(Source):
|
class Amazon(Source):
|
||||||
|
|
||||||
name = 'Amazon.com'
|
name = 'Amazon.com'
|
||||||
version = (1, 2, 24)
|
version = (1, 2, 25)
|
||||||
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')
|
||||||
|
|
||||||
@ -993,6 +993,7 @@ class Amazon(Source):
|
|||||||
'jp': _('Japan'),
|
'jp': _('Japan'),
|
||||||
'es': _('Spain'),
|
'es': _('Spain'),
|
||||||
'br': _('Brazil'),
|
'br': _('Brazil'),
|
||||||
|
'in': _('India'),
|
||||||
'nl': _('Netherlands'),
|
'nl': _('Netherlands'),
|
||||||
'cn': _('China'),
|
'cn': _('China'),
|
||||||
'ca': _('Canada'),
|
'ca': _('Canada'),
|
||||||
@ -1109,7 +1110,7 @@ class Amazon(Source):
|
|||||||
|
|
||||||
def _get_book_url(self, identifiers): # {{{
|
def _get_book_url(self, identifiers): # {{{
|
||||||
domain, asin = self.get_domain_and_asin(
|
domain, asin = self.get_domain_and_asin(
|
||||||
identifiers, extra_domains=('in', 'au', 'ca'))
|
identifiers, extra_domains=('au', 'ca'))
|
||||||
if domain and asin:
|
if domain and asin:
|
||||||
url = None
|
url = None
|
||||||
r = self.referrer_for_domain(domain)
|
r = self.referrer_for_domain(domain)
|
||||||
@ -1812,6 +1813,13 @@ def manual_tests(domain, **kw): # {{{
|
|||||||
),
|
),
|
||||||
] # }}}
|
] # }}}
|
||||||
|
|
||||||
|
all_tests['in'] = [ # {{{
|
||||||
|
( # Paperback with series
|
||||||
|
{'identifiers': {'amazon_in': '1423146786'}},
|
||||||
|
[title_test('The Heroes of Olympus, Book Five The Blood of Olympus', exact=True)]
|
||||||
|
),
|
||||||
|
] # }}}
|
||||||
|
|
||||||
def do_test(domain, start=0, stop=None, server='auto'):
|
def do_test(domain, start=0, stop=None, server='auto'):
|
||||||
tests = all_tests[domain]
|
tests = all_tests[domain]
|
||||||
if stop is None:
|
if stop is None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user