From 6c8a8142bdde50ecfdf307cd4365fb398376a54d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 5 Jun 2016 12:41:42 +0530 Subject: [PATCH] Apply an easily identifiable pattern for bad catalog entries --- src/calibre/ebooks/metadata/sources/amazon.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/ebooks/metadata/sources/amazon.py b/src/calibre/ebooks/metadata/sources/amazon.py index 8b08efa66e..7615c57f75 100644 --- a/src/calibre/ebooks/metadata/sources/amazon.py +++ b/src/calibre/ebooks/metadata/sources/amazon.py @@ -987,6 +987,9 @@ class Amazon(Source): for x in bad: if x in title: return False + if title and title[0] in '[{' and re.search(r'\(\s*author\s*\)', title) is not None: + # Bad entries in the catalog + return False return True for a in root.xpath(r'//li[starts-with(@id, "result_")]//a[@href and contains(@class, "s-access-detail-page")]'):