mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
py3: store plugins always receive bytes query
... and cannot be further encoded. When interpolating into strings, however, they do need to decode it.
This commit is contained in:
parent
69cf3d345a
commit
1edab4b818
@ -40,7 +40,7 @@ class BNStore(BasicStoreConfig, StorePlugin):
|
||||
d.exec_()
|
||||
|
||||
def search(self, query, max_results=10, timeout=60):
|
||||
url = 'http://www.barnesandnoble.com/s/%s?keyword=%s&store=ebook&view=list' % (query.replace(' ', '-'), quote_plus(query))
|
||||
url = 'http://www.barnesandnoble.com/s/%s?keyword=%s&store=ebook&view=list' % (query.decode('utf-8').replace(' ', '-'), quote_plus(query))
|
||||
|
||||
br = browser()
|
||||
|
||||
|
@ -36,7 +36,7 @@ def as_base64(data):
|
||||
|
||||
|
||||
def search(query, max_results=10, timeout=60):
|
||||
url = 'http://woblink.com/publication/ajax?mode=none&query=' + quote_plus(query.encode('utf-8'))
|
||||
url = 'http://woblink.com/publication/ajax?mode=none&query=' + quote_plus(query)
|
||||
if max_results > 10:
|
||||
if max_results > 20:
|
||||
url += '&limit=30'
|
||||
|
@ -44,7 +44,7 @@ class WolneLekturyStore(BasicStoreConfig, StorePlugin):
|
||||
d.exec_()
|
||||
|
||||
def search(self, query, max_results=10, timeout=60):
|
||||
url = 'http://wolnelektury.pl/szukaj?q=' + quote_plus(query.encode('utf-8'))
|
||||
url = 'http://wolnelektury.pl/szukaj?q=' + quote_plus(query)
|
||||
|
||||
br = browser()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user