From 6c4a979058462c87b653308e02e3b537b6591fcc Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 15 Apr 2022 09:19:43 +0530 Subject: [PATCH] Amazon metadata download: Add support for amazon.in country website --- src/calibre/ebooks/metadata/sources/amazon.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/metadata/sources/amazon.py b/src/calibre/ebooks/metadata/sources/amazon.py index 7d39581042..335289991c 100644 --- a/src/calibre/ebooks/metadata/sources/amazon.py +++ b/src/calibre/ebooks/metadata/sources/amazon.py @@ -971,7 +971,7 @@ class Worker(Thread): # Get details {{{ class Amazon(Source): name = 'Amazon.com' - version = (1, 2, 24) + version = (1, 2, 25) minimum_calibre_version = (2, 82, 0) description = _('Downloads metadata and covers from Amazon') @@ -993,6 +993,7 @@ class Amazon(Source): 'jp': _('Japan'), 'es': _('Spain'), 'br': _('Brazil'), + 'in': _('India'), 'nl': _('Netherlands'), 'cn': _('China'), 'ca': _('Canada'), @@ -1109,7 +1110,7 @@ class Amazon(Source): def _get_book_url(self, identifiers): # {{{ domain, asin = self.get_domain_and_asin( - identifiers, extra_domains=('in', 'au', 'ca')) + identifiers, extra_domains=('au', 'ca')) if domain and asin: url = None 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'): tests = all_tests[domain] if stop is None: