mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Store: Fix Manybooks plugin.
This commit is contained in:
parent
f9c1c6e7f0
commit
9ab85b0710
@ -49,7 +49,9 @@ class ManyBooksStore(BasicStoreConfig, OpenSearchOPDSStore):
|
|||||||
counter = max_results
|
counter = max_results
|
||||||
br = browser()
|
br = browser()
|
||||||
with closing(br.open(url, timeout=timeout)) as f:
|
with closing(br.open(url, timeout=timeout)) as f:
|
||||||
doc = etree.fromstring(f.read())
|
raw_data = f.read()
|
||||||
|
raw_data = raw_data.decode('utf-8', 'replace')
|
||||||
|
doc = etree.fromstring(raw_data)
|
||||||
for data in doc.xpath('//*[local-name() = "entry"]'):
|
for data in doc.xpath('//*[local-name() = "entry"]'):
|
||||||
if counter <= 0:
|
if counter <= 0:
|
||||||
break
|
break
|
||||||
|
Loading…
x
Reference in New Issue
Block a user