From 4151cdf9b528d71bbf3471df1e39ffe41f9371be Mon Sep 17 00:00:00 2001 From: SickrageDK Date: Thu, 5 Feb 2015 11:23:39 +0100 Subject: [PATCH 1/2] Changes to fit new site layout --- sickbeard/providers/hounddawgs.py | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/sickbeard/providers/hounddawgs.py b/sickbeard/providers/hounddawgs.py index 978236a9..acfb2c5a 100644 --- a/sickbeard/providers/hounddawgs.py +++ b/sickbeard/providers/hounddawgs.py @@ -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 From 98d923555ec13ea60eed03a6a1c8afff501a2a3b Mon Sep 17 00:00:00 2001 From: SickrageDK Date: Fri, 20 Feb 2015 12:30:10 +0100 Subject: [PATCH 2/2] Use hostname rather than IP --- sickbeard/providers/hounddawgs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sickbeard/providers/hounddawgs.py b/sickbeard/providers/hounddawgs.py index acfb2c5a..ac51d2d8 100644 --- a/sickbeard/providers/hounddawgs.py +++ b/sickbeard/providers/hounddawgs.py @@ -56,9 +56,9 @@ class HoundDawgsProvider(generic.TorrentProvider): self.cache = HoundDawgsCache(self) - 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.urls = {'base_url': 'https://hounddawgs.org/', + 'search': 'https://hounddawgs.org/torrents.php?type=&userid=&searchstr=%s&searchimdb=&searchtags=&order_by=s3&order_way=desc&%s', + 'login': 'https://hounddawgs.org/login.php', } self.url = self.urls['base_url']