mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Adds Amazon Mexico store
This commit is contained in:
parent
fec7d8bddf
commit
1f584ad77e
@ -1240,6 +1240,7 @@ class Amazon(Source):
|
||||
'au': 'https://www.amazon.com.au/',
|
||||
'br': 'https://www.amazon.com.br/',
|
||||
'jp': 'https://www.amazon.co.jp/',
|
||||
'mx': 'https://www.amazon.com.mx/',
|
||||
}.get(domain, 'https://www.amazon.%s/' % domain)
|
||||
|
||||
def _get_book_url(self, identifiers): # {{{
|
||||
|
29
src/calibre/gui2/store/stores/amazon_mx_plugin.py
Normal file
29
src/calibre/gui2/store/stores/amazon_mx_plugin.py
Normal file
@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env python
|
||||
# vim:fileencoding=utf-8
|
||||
# License: GPLv3 Copyright: 2015, Kovid Goyal <kovid at kovidgoyal.net>
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
store_version = 20 # Needed for dynamic plugin loading
|
||||
|
||||
from calibre.gui2.store import StorePlugin
|
||||
try:
|
||||
from calibre.gui2.store.amazon_base import AmazonStore
|
||||
except ImportError:
|
||||
class AmazonStore:
|
||||
minimum_calibre_version = 9999, 0, 0
|
||||
|
||||
|
||||
class Base(AmazonStore):
|
||||
scraper_storage = []
|
||||
SEARCH_BASE_URL = 'https://www.amazon.com.mx/s/'
|
||||
SEARCH_BASE_QUERY = {'url': 'search-alias=digital-text'}
|
||||
DETAILS_URL = 'https://amazon.com.mx/dp/'
|
||||
STORE_LINK = 'https://www.amazon.com.mx'
|
||||
|
||||
|
||||
class AmazonKindleStore(Base, StorePlugin):
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
Base().develop_plugin()
|
Loading…
x
Reference in New Issue
Block a user