fix kickass ml

pull/1/head
DiMartinoXBMC 2015-08-26 20:54:04 +03:00
parent 219431b312
commit 05ad690664
2 changed files with 29 additions and 22 deletions

View File

@ -1,5 +1,9 @@
English changelog at http://bit.ly/1MfSVUP
[B]Version 2.3.8[/B]
[+] Добавлен АнтиЗапрет
[+] Списки Медиа: Исправлен KickAssSo
[B]Version 2.3.6[/B]
[+] Оптимизация импорта, ускорена работа меню
[+] Новый Проигрыватель [url=https://github.com/izderadicka/btclient]BTclient[/url] в тестовом режиме, требует python-libtorrent >=1.0.4.

View File

@ -89,31 +89,34 @@ class KickAssSo(Content.Content):
# print str(result)
num = 51
good_forums = ['TV', 'Anime', 'Movies']
result = re.compile(
r'''title="Download torrent file" href="(.+?\.torrent).+?" class=".+?"><i.+?<a.+?<a.+?<a href="(.+?html)" class=".+?">(.+?)</a>.+? in <span.+?"><strong>.+?">(.+?)</a>.+?<td class="nobr center">(.+?)</td>.+?<td class="center">(\d+&nbsp;.+?)</td>.+?<td class="green center">(\d+?)</td>.+?<td class="red lasttd center">(\d+?)</td>''',
re.DOTALL).findall(response)
for link, infolink, title, forum, size, date, seeds, leechers in result:
regex = '''<tr class=".+?" id=.+?</tr>'''
regex_tr = r'''title="Download torrent file" href="(.+?\.torrent).+?" class=".+?"><i.+?<a.+?<a.+?<a href="(.+?html)" class=".+?">(.+?)</a>.+? in <span.+?"><strong>.+?">(.+?)</a>.+?<td class="nobr center">(.+?)</td>.+?<td class="center".+?>(\d+&nbsp;.+?)</td>.+?<td class="green center">(\d+?)</td>.+?<td class="red lasttd center">(\d+?)</td>'''
for tr in re.compile(regex, re.DOTALL).findall(response):
result=re.compile(regex_tr, re.DOTALL).findall(tr)
#print str(result)
if result:
(link, infolink, title, forum, size, date, seeds, leechers)=result[0]
# main
if forum in good_forums:
info = {}
num = num - 1
original_title = None
year = 0
img = ''
# info
if forum in good_forums:
info = {}
num = num - 1
original_title = None
year = 0
img = ''
# info
info['label'] = info['title'] = self.unescape(title)
info['link'] = link
info['infolink'] = self.baseurl + infolink
size = self.unescape(self.stripHtml(size))
date = self.unescape(self.stripHtml(date))
info['plot'] = info['title'] + '\r\n[I](%s) [S/L: %s/%s] [/I]\r\nAge: %s' % (
size, seeds, leechers, date)
info['label'] = info['title'] = self.unescape(title)
info['link'] = link
info['infolink'] = self.baseurl + infolink
size = self.unescape(self.stripHtml(size))
date = self.unescape(self.stripHtml(date))
info['plot'] = info['title'] + '\r\n[I](%s) [S/L: %s/%s] [/I]\r\nAge: %s' % (
size, seeds, leechers, date)
contentList.append((
int(int(self.sourceWeight) * (int(num))),
original_title, title, int(year), img, info,
))
contentList.append((
int(int(self.sourceWeight) * (int(num))),
original_title, title, int(year), img, info,
))
return contentList
def get_info(self, url):