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 English changelog at http://bit.ly/1MfSVUP
[B]Version 2.3.8[/B]
[+] Добавлен АнтиЗапрет
[+] Списки Медиа: Исправлен KickAssSo
[B]Version 2.3.6[/B] [B]Version 2.3.6[/B]
[+] Оптимизация импорта, ускорена работа меню [+] Оптимизация импорта, ускорена работа меню
[+] Новый Проигрыватель [url=https://github.com/izderadicka/btclient]BTclient[/url] в тестовом режиме, требует python-libtorrent >=1.0.4. [+] Новый Проигрыватель [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) # print str(result)
num = 51 num = 51
good_forums = ['TV', 'Anime', 'Movies'] good_forums = ['TV', 'Anime', 'Movies']
result = re.compile( regex = '''<tr class=".+?" id=.+?</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>''', 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>'''
re.DOTALL).findall(response) for tr in re.compile(regex, re.DOTALL).findall(response):
for link, infolink, title, forum, size, date, seeds, leechers in result: 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 # main
if forum in good_forums: if forum in good_forums:
info = {} info = {}
num = num - 1 num = num - 1
original_title = None original_title = None
year = 0 year = 0
img = '' img = ''
# info # info
info['label'] = info['title'] = self.unescape(title) info['label'] = info['title'] = self.unescape(title)
info['link'] = link info['link'] = link
info['infolink'] = self.baseurl + infolink info['infolink'] = self.baseurl + infolink
size = self.unescape(self.stripHtml(size)) size = self.unescape(self.stripHtml(size))
date = self.unescape(self.stripHtml(date)) date = self.unescape(self.stripHtml(date))
info['plot'] = info['title'] + '\r\n[I](%s) [S/L: %s/%s] [/I]\r\nAge: %s' % ( info['plot'] = info['title'] + '\r\n[I](%s) [S/L: %s/%s] [/I]\r\nAge: %s' % (
size, seeds, leechers, date) size, seeds, leechers, date)
contentList.append(( contentList.append((
int(int(self.sourceWeight) * (int(num))), int(int(self.sourceWeight) * (int(num))),
original_title, title, int(year), img, info, original_title, title, int(year), img, info,
)) ))
return contentList return contentList
def get_info(self, url): def get_info(self, url):