This commit is contained in:
DiMartinoXBMC committed 2015-05-14 19:20:49 +03:00
1 parent 4da09c6751
commit 49a24bec2c
7 files changed
+52 -21

No files matched your search

+4 -2
View File
@@ -87,15 +87,17 @@ class RuTorOrg(SearcherABC.SearcherABC):
('Cookie', str(sys.modules["__main__"].__settings__.getSetting("rutor-auth")))]
response = self.makeRequest(url, headers=headers)
#print response
if None != response and 0 < len(response):
dat = re.compile(
'<tr class="[tg].+?<a.+?href="(/download/\d+)">.+?<a href=".+?">.+?<a href=".+?">(.+?)</a></td>.+?<td align="right">(\d*?\..+?&nbsp;.+?)</td>.+?<img .+?alt="S".+?>&nbsp;(\d+)</span>.+?alt="L".+?>&nbsp;(\d+)',
'<tr class="[tg].+?<a.+?href="(.+?download/\d+)">.+?<a href=".+?">.+?<a href=".+?">(.+?)</a></td>.+?<td align="right">(\d*?\..+?&nbsp;.+?)</td>.+?<img .+?alt="S".+?>&nbsp;(\d+)</span>.+?alt="L".+?>&nbsp;(\d+)',
re.DOTALL).findall(response)
if dat and len(dat) > 0:
for (link, title, size, seeds, leechers) in dat:
torrentTitle = title.strip() #"%s [S\L: %s\%s]" % (title, seeds, leechers)
size = size.replace('&nbsp;', ' ')
link='http://zerkalo-rutor.org'+link
if link[0]=='/': link='http://zerkalo-rutor.org'+link
image = sys.modules["__main__"].__root__ + self.searchIcon
filesList.append((
int(int(self.sourceWeight) * int(seeds)),