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

Bug #1649371 reported by Ereniken Borken
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
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)
description: updated
Ereniken Borken (rikis)
description: updated
Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in master

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.