Improvements for e-knigi store search

This commit is contained in:
Alex Stanev 2011-12-06 16:23:25 +02:00
parent 28d4a74d4c
commit 0c72fca935

View File

@ -46,9 +46,9 @@ class eKnigiStore(BasicStoreConfig, StorePlugin):
d.exec_()
def search(self, query, max_results=10, timeout=60):
# check for cyrilic symbols before performing search
# check for cyrillic symbols before performing search
uquery = unicode(query.strip(), 'utf-8')
reObj = re.search(u'^[а-яА-Я\\d]{2,}[а-яА-Я\\d\\s]*$', uquery)
reObj = re.search(u'^[а-яА-Я\\d\\s]{2,}$', uquery)
if not reObj:
return