mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Remove the local language equivalent of 'by ' from the EU amazon store author names.
This commit is contained in:
commit
1f40a37eed
@ -22,3 +22,4 @@ class AmazonDEKindleStore(AmazonUKKindleStore):
|
|||||||
'&tag=%(tag)s&linkCode=ur2&camp=1638&creative=6742')
|
'&tag=%(tag)s&linkCode=ur2&camp=1638&creative=6742')
|
||||||
search_url = 'http://www.amazon.de/s/?url=search-alias%3Ddigital-text&field-keywords='
|
search_url = 'http://www.amazon.de/s/?url=search-alias%3Ddigital-text&field-keywords='
|
||||||
|
|
||||||
|
author_article = 'von '
|
||||||
|
@ -20,3 +20,5 @@ class AmazonESKindleStore(AmazonUKKindleStore):
|
|||||||
'location=http://www.amazon.es/dp/%(asin)s&tag=%(tag)s'
|
'location=http://www.amazon.es/dp/%(asin)s&tag=%(tag)s'
|
||||||
'&linkCode=ur2&camp=3626&creative=24790')
|
'&linkCode=ur2&camp=3626&creative=24790')
|
||||||
search_url = 'http://www.amazon.es/s/?url=search-alias%3Ddigital-text&field-keywords='
|
search_url = 'http://www.amazon.es/s/?url=search-alias%3Ddigital-text&field-keywords='
|
||||||
|
|
||||||
|
author_article = 'de '
|
@ -19,3 +19,4 @@ class AmazonFRKindleStore(AmazonUKKindleStore):
|
|||||||
store_link_details = 'http://www.amazon.fr/gp/redirect.html?ie=UTF8&location=http://www.amazon.fr/dp/%(asin)s&tag=%(tag)s&linkCode=ur2&camp=1634&creative=6738'
|
store_link_details = 'http://www.amazon.fr/gp/redirect.html?ie=UTF8&location=http://www.amazon.fr/dp/%(asin)s&tag=%(tag)s&linkCode=ur2&camp=1634&creative=6738'
|
||||||
search_url = 'http://www.amazon.fr/s/?url=search-alias%3Ddigital-text&field-keywords='
|
search_url = 'http://www.amazon.fr/s/?url=search-alias%3Ddigital-text&field-keywords='
|
||||||
|
|
||||||
|
author_article = 'de '
|
||||||
|
@ -20,3 +20,5 @@ class AmazonITKindleStore(AmazonUKKindleStore):
|
|||||||
'location=http://www.amazon.it/dp/%(asin)s&tag=%(tag)s&'
|
'location=http://www.amazon.it/dp/%(asin)s&tag=%(tag)s&'
|
||||||
'linkCode=ur2&camp=3370&creative=23322')
|
'linkCode=ur2&camp=3370&creative=23322')
|
||||||
search_url = 'http://www.amazon.it/s/?url=search-alias%3Ddigital-text&field-keywords='
|
search_url = 'http://www.amazon.it/s/?url=search-alias%3Ddigital-text&field-keywords='
|
||||||
|
|
||||||
|
author_article = 'di '
|
@ -29,6 +29,8 @@ class AmazonUKKindleStore(StorePlugin):
|
|||||||
'linkCode=ur2&camp=1634&creative=6738')
|
'linkCode=ur2&camp=1634&creative=6738')
|
||||||
search_url = 'http://www.amazon.co.uk/s/?url=search-alias%3Ddigital-text&field-keywords='
|
search_url = 'http://www.amazon.co.uk/s/?url=search-alias%3Ddigital-text&field-keywords='
|
||||||
|
|
||||||
|
author_article = 'by '
|
||||||
|
|
||||||
'''
|
'''
|
||||||
For comments on the implementation, please see amazon_plugin.py
|
For comments on the implementation, please see amazon_plugin.py
|
||||||
'''
|
'''
|
||||||
@ -88,7 +90,8 @@ class AmazonUKKindleStore(StorePlugin):
|
|||||||
title = ''.join(data.xpath(title_xpath))
|
title = ''.join(data.xpath(title_xpath))
|
||||||
author = ''.join(data.xpath(author_xpath))
|
author = ''.join(data.xpath(author_xpath))
|
||||||
try:
|
try:
|
||||||
author = author.split('by ', 1)[1].split(" (")[0]
|
if self.author_article:
|
||||||
|
author = author.split(self.author_article, 1)[1].split(" (")[0]
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user