1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-11-17 23:05:11 -05:00

Changes to fit new site layout

This commit is contained in:
SickrageDK 2015-02-05 11:23:39 +01:00
parent c62d8f2c79
commit 4151cdf9b5

View File

@ -56,9 +56,9 @@ class HoundDawgsProvider(generic.TorrentProvider):
self.cache = HoundDawgsCache(self)
self.urls = {'base_url': 'http://192.99.10.104/',
'search': 'http://192.99.10.104/torrents.php?type=&userid=&searchstr=%s&searchimdb=&searchtags=&order_by=s3&order_way=desc&%s',
'login': 'http://192.99.10.104/login.php',
self.urls = {'base_url': 'https://192.99.10.104/',
'search': 'https://192.99.10.104/torrents.php?type=&userid=&searchstr=%s&searchimdb=&searchtags=&order_by=s3&order_way=desc&%s',
'login': 'https://192.99.10.104/login.php',
}
self.url = self.urls['base_url']
@ -154,9 +154,10 @@ class HoundDawgsProvider(generic.TorrentProvider):
items = {'Season': [], 'Episode': [], 'RSS': []}
if not self._doLogin():
return []
return results
for mode in search_params.keys():
for search_string in search_params[mode]:
if isinstance(search_string, unicode):
@ -214,20 +215,14 @@ class HoundDawgsProvider(generic.TorrentProvider):
download_url = self.urls['base_url']+allAs[0].attrs['href']
id = link.replace(self.urls['base_url']+'torrents.php?id=','')
seeders = int(torrent[7].string)
leechers = int(torrent[8].string)
except (AttributeError, TypeError):
continue
#Filter unseeded torrent
if mode != 'RSS' and (seeders < self.minseed or leechers < self.minleech):
continue
if not title or not download_url:
continue
item = title, download_url, id, seeders, leechers
item = title, download_url
logger.log(u"Found result: " + title + "(" + download_url + ")", logger.DEBUG)
items[mode].append(item)
@ -235,16 +230,13 @@ class HoundDawgsProvider(generic.TorrentProvider):
except Exception, e:
logger.log(u"Failed parsing " + self.name + " Traceback: " + traceback.format_exc(), logger.ERROR)
#For each search mode sort all the items by seeders
items[mode].sort(key=lambda tup: tup[3], reverse=True)
results += items[mode]
return results
def _get_title_and_url(self, item):
title, url, id, seeders, leechers = item
title, url = item
if title:
title = u'' + title