Исправлены проблемы определения размера и добавлена сортировка по сидам

This commit is contained in:
Бородин Роман committed 2020-12-05 23:18:47 +03:00
1 parent 27ddd8a9ac
commit e5bd0ca668
3 files changed
+6 -5

No files matched your search

+4 -3
View File
@@ -6,7 +6,7 @@ from codequick.listing import local_image # @UnresolvedImport
class SearchEngine(Searcher):
base_url = option['kinozal_url']
search_path = '/browse.php?s={}&g=0&c=0&v=0&d=0&w=0&t=1&f=0'
search_path = '/browse.php?s={}&t=1'
name = 'Kinozal.tv'
icon = 'searcher_kinozal.png'
enabled = option.get_boolean('kinozal_enable') # @UndefinedVariable
@@ -27,9 +27,10 @@ class SearchEngine(Searcher):
title = link.text
seeders = int(r.find('.//td[@class="sl_s"]').text.strip())
leachers = int(r.find('.//td[@class="sl_p"]').text.strip())
size = list(filter(lambda x: x.text.strip().endswith((u'ГБ', u'МБ')),
size_l = list(filter(lambda x: x.text.strip().endswith((u'ГБ', u'МБ')),
r.findall('.//td[@class="s"]'))
)[0].text.strip()
)
size = size_l[0].text.strip() if len(size_l) else '0'
yield ResultItem(url, title, size, seeders, leachers, self.icon, self.cookies, self.base_url)
def login(self):
user = option['kinozal_login']
+1 -1
View File
@@ -6,7 +6,7 @@ from codequick.listing import local_image # @UnresolvedImport
class SearchEngine(Searcher):
base_url = option['rutracker_url']
search_path = '/forum/tracker.php?nm={}'
search_path = '/forum/tracker.php?nm={}&o=10&s=2'
name = 'RuTracker.org'
icon = 'searcher_rutracker.png'
enabled = option.get_boolean('rutracker_enable') # @UndefinedVariable