Proper link ISBN for searching in Amazon au, in, ca

Bug #1649371 reported by Ereniken Borken on 2016-12-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

amazon_ca, amazon_in, amazon_au Canada, India, Australia doesn't make link with "Ids: Amazon.com".

Someone needs to edit:
-> \calibre-master\src\calibre\ebooks\metadata\sources\amazon.py
 AMAZON_DOMAINS = {
            'com': _('US'),
            'fr': _('France'),
            'de': _('Germany'),
            'uk': _('UK'),
            'it': _('Italy'),
            'jp': _('Japan'),
            'es': _('Spain'),
            'br': _('Brazil'),
            'nl': _('Netherlands'),
....
    }

   def _get_book_url(self, identifiers): # {{{
        domain, asin = self.get_domain_and_asin(identifiers)
        if domain and asin:
            url = None
            if domain == 'com':
                url = 'https://amzn.com/'+asin
            elif domain == 'uk':
                url = 'https://www.amazon.co.uk/dp/'+asin
            elif domain == 'br':
                url = 'https://www.amazon.com.br/dp/'+asin
            else:
                url = 'https://www.amazon.%s/dp/%s'%(domain, asin)
            if url:
                idtype = 'amazon' if domain == 'com' else 'amazon_'+domain
                return domain, idtype, asin, url

    def get_website_domain(self, domain):
        udomain = domain
        if domain == 'uk':
            udomain = 'co.uk'
        elif domain == 'jp':
            udomain = 'co.jp'
        elif domain == 'br':
            udomain = 'com.br'
        return udomain

Ereniken Borken (rikis) on 2016-12-12
description: updated
Ereniken Borken (rikis) on 2016-12-12
description: updated

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers