mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
fix encoding and drm status
This commit is contained in:
parent
0b98eb5b38
commit
dc5e32ae05
@ -1473,6 +1473,7 @@ class StoreKoobeStore(StoreBase):
|
||||
description = u'Księgarnia internetowa oferuje ebooki (książki elektroniczne) w postaci plików epub, mobi i pdf.'
|
||||
actual_plugin = 'calibre.gui2.store.stores.koobe_plugin:KoobeStore'
|
||||
|
||||
drm_free_only = True
|
||||
headquarters = 'PL'
|
||||
formats = ['EPUB', 'MOBI', 'PDF']
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import (unicode_literals, division, absolute_import, print_function)
|
||||
from __future__ import (division, absolute_import, print_function)
|
||||
store_version = 1 # Needed for dynamic plugin loading
|
||||
|
||||
__license__ = 'GPL 3'
|
||||
@ -42,7 +42,7 @@ class KoobeStore(BasicStoreConfig, StorePlugin):
|
||||
|
||||
counter = max_results
|
||||
with closing(br.open(url, timeout=timeout)) as f:
|
||||
doc = html.fromstring(f.read())
|
||||
doc = html.fromstring(f.read().decode('utf-8'))
|
||||
for data in doc.xpath('//div[@class="seach_result"]/div[@class="result"]'):
|
||||
if counter <= 0:
|
||||
break
|
||||
@ -66,6 +66,6 @@ class KoobeStore(BasicStoreConfig, StorePlugin):
|
||||
s.price = price
|
||||
s.detail_item = 'http://koobe.pl' + id[1:]
|
||||
s.formats = formats.upper()
|
||||
s.drm = SearchResult.DRM_UNKNOWN
|
||||
s.drm = SearchResult.DRM_UNLOCKED
|
||||
|
||||
yield s
|
||||
|
Loading…
x
Reference in New Issue
Block a user