diff --git a/src/calibre/gui2/store/stores/libri_de_plugin.py b/src/calibre/gui2/store/stores/libri_de_plugin.py index 7575260485..d0a5125836 100644 --- a/src/calibre/gui2/store/stores/libri_de_plugin.py +++ b/src/calibre/gui2/store/stores/libri_de_plugin.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals -store_version = 5 # Needed for dynamic plugin loading +store_version = 6 # Needed for dynamic plugin loading __license__ = 'GPL 3' __copyright__ = '2011, John Schember ' @@ -52,19 +52,17 @@ class LibreDEStore(BasicStoreConfig, StorePlugin): counter = max_results with closing(br.open(url, timeout=timeout)) as f: doc = html.fromstring(f.read()) - for data in doc.xpath('//div[contains(@class, "articlecontainer")]'): + for data in doc.xpath('//div[@class="articlecontainer"]'): if counter <= 0: break - + id_ = ''.join(data.xpath('.//div[@class="trackArtiId"]/text()')) + if not id_: + continue details = data.xpath('./div[contains(@class, "articleinfobox")]') if not details: continue details = details[0] - id_ = ''.join(details.xpath('./a/@name')).strip() - if not id_: - continue - title = ''.join(details.xpath('./h3[@class="title"]/a/text()')).strip() - + title = ''.join(details.xpath('./div[@class="title"]/a/text()')).strip() author = ''.join(details.xpath('.//div[@class="author"]/text()')).strip() if author.startswith('von'): author = author[4:]