From e4349e8db180442a691877b98c2c9fa4547346d5 Mon Sep 17 00:00:00 2001 From: ngosang Date: Sat, 23 Apr 2016 21:57:05 +0200 Subject: [PATCH 1/3] [Search engine] Fix Torrentz plugin for Python2 --- src/searchengine/nova/engines/torrentz.py | 9 ++++----- src/searchengine/nova/engines/versions.txt | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/searchengine/nova/engines/torrentz.py b/src/searchengine/nova/engines/torrentz.py index 591db2ed4..414427cf2 100644 --- a/src/searchengine/nova/engines/torrentz.py +++ b/src/searchengine/nova/engines/torrentz.py @@ -1,4 +1,4 @@ -#VERSION: 2.18 +#VERSION: 2.19 #AUTHORS: Diego de las Heras (ngosang@hotmail.es) # Redistribution and use in source and binary forms, with or without @@ -92,10 +92,9 @@ class torrentz(object): # display item self.td_counter = None self.current_item['engine_url'] = self.url - if self.current_item['name'].find(u' \xc2'): - self.current_item['name'] = self.current_item['name'].split(u' \xc2')[0] - self.current_item['link'] += '&' + urlencode({'dn' : self.current_item['name']}) - self.current_item['name'] = self.current_item['name'].decode('utf8') + if self.current_item['name'].find(u' \xbb'): + self.current_item['name'] = self.current_item['name'].split(u' \xbb')[0] + self.current_item['link'] += '&' + urlencode({'dn' : self.current_item['name'].encode('utf-8')}) prettyPrinter(self.current_item) self.results.append('a') diff --git a/src/searchengine/nova/engines/versions.txt b/src/searchengine/nova/engines/versions.txt index b2c23beb6..1f01857d3 100644 --- a/src/searchengine/nova/engines/versions.txt +++ b/src/searchengine/nova/engines/versions.txt @@ -7,4 +7,4 @@ mininova: 2.01 piratebay: 2.14 torlock: 2.0 torrentreactor: 1.41 -torrentz: 2.18 +torrentz: 2.19 From 06cd41801ee1dd75cd6e2816ee1636cd2b9015e4 Mon Sep 17 00:00:00 2001 From: ngosang Date: Sat, 23 Apr 2016 22:37:19 +0200 Subject: [PATCH 2/3] [Search engine] Fix Mininova plugin --- src/searchengine/nova/engines/mininova.py | 5 ++++- src/searchengine/nova/engines/versions.txt | 2 +- src/searchengine/nova3/engines/mininova.py | 5 ++++- src/searchengine/nova3/engines/versions.txt | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/searchengine/nova/engines/mininova.py b/src/searchengine/nova/engines/mininova.py index 485af2170..b001d89f1 100644 --- a/src/searchengine/nova/engines/mininova.py +++ b/src/searchengine/nova/engines/mininova.py @@ -1,4 +1,4 @@ -#VERSION: 2.01 +#VERSION: 2.02 #AUTHORS: Christophe Dumez (chris@qbittorrent.org) #CONTRIBUTORS: Diego de las Heras (ngosang@hotmail.es) @@ -90,6 +90,9 @@ class mininova(object): if ("class", "g") in attrs: self.cur_item_name = "seeds" self.current_item["seeds"] = "" + elif ("class", "r") in attrs: + self.cur_item_name = "seeds" + self.current_item["seeds"] = "" elif ("class", "b") in attrs: self.cur_item_name = "leech" self.current_item["leech"] = "" diff --git a/src/searchengine/nova/engines/versions.txt b/src/searchengine/nova/engines/versions.txt index 1f01857d3..116f6b024 100644 --- a/src/searchengine/nova/engines/versions.txt +++ b/src/searchengine/nova/engines/versions.txt @@ -3,7 +3,7 @@ demonoid: 1.2 extratorrent: 2.04 kickasstorrents: 1.28 legittorrents: 2.00 -mininova: 2.01 +mininova: 2.02 piratebay: 2.14 torlock: 2.0 torrentreactor: 1.41 diff --git a/src/searchengine/nova3/engines/mininova.py b/src/searchengine/nova3/engines/mininova.py index 86205f267..3e241d114 100644 --- a/src/searchengine/nova3/engines/mininova.py +++ b/src/searchengine/nova3/engines/mininova.py @@ -1,4 +1,4 @@ -#VERSION: 2.01 +#VERSION: 2.02 #AUTHORS: Christophe Dumez (chris@qbittorrent.org) #CONTRIBUTORS: Diego de las Heras (ngosang@hotmail.es) @@ -90,6 +90,9 @@ class mininova(object): if ("class", "g") in attrs: self.cur_item_name = "seeds" self.current_item["seeds"] = "" + elif ("class", "r") in attrs: + self.cur_item_name = "seeds" + self.current_item["seeds"] = "" elif ("class", "b") in attrs: self.cur_item_name = "leech" self.current_item["leech"] = "" diff --git a/src/searchengine/nova3/engines/versions.txt b/src/searchengine/nova3/engines/versions.txt index c713b35fc..a2cb946a0 100644 --- a/src/searchengine/nova3/engines/versions.txt +++ b/src/searchengine/nova3/engines/versions.txt @@ -3,7 +3,7 @@ demonoid: 1.2 extratorrent: 2.04 kickasstorrents: 1.28 legittorrents: 2.00 -mininova: 2.01 +mininova: 2.02 piratebay: 2.14 torlock: 2.0 torrentreactor: 1.41 From e542f178096da29ab39ba6ae16b5133776c62ed0 Mon Sep 17 00:00:00 2001 From: ngosang Date: Sat, 23 Apr 2016 23:18:48 +0200 Subject: [PATCH 3/3] [Search engine] Fix LegitTorrents plugin --- src/searchengine/nova/engines/legittorrents.py | 4 ++-- src/searchengine/nova/engines/versions.txt | 2 +- src/searchengine/nova3/engines/legittorrents.py | 4 ++-- src/searchengine/nova3/engines/versions.txt | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/searchengine/nova/engines/legittorrents.py b/src/searchengine/nova/engines/legittorrents.py index 59c9f2d15..430ccf531 100644 --- a/src/searchengine/nova/engines/legittorrents.py +++ b/src/searchengine/nova/engines/legittorrents.py @@ -1,4 +1,4 @@ -#VERSION: 2.00 +#VERSION: 2.01 #AUTHORS: Christophe Dumez (chris@qbittorrent.org) # Douman (custparasite@gmx.se) @@ -61,7 +61,7 @@ class legittorrents(object): elif link.startswith("download"): self.current_item["link"] = "/".join((self.url, link)) elif tag == "td": - if "class" in params and params["class"].startswith("#FF"): + if "width" in params and params["width"] == "30": self.save_item_key = "leech" if "seeds" in self.current_item else "seeds" elif tag == "tr": diff --git a/src/searchengine/nova/engines/versions.txt b/src/searchengine/nova/engines/versions.txt index 116f6b024..838d66ef6 100644 --- a/src/searchengine/nova/engines/versions.txt +++ b/src/searchengine/nova/engines/versions.txt @@ -2,7 +2,7 @@ btdigg: 1.31 demonoid: 1.2 extratorrent: 2.04 kickasstorrents: 1.28 -legittorrents: 2.00 +legittorrents: 2.01 mininova: 2.02 piratebay: 2.14 torlock: 2.0 diff --git a/src/searchengine/nova3/engines/legittorrents.py b/src/searchengine/nova3/engines/legittorrents.py index c3e9bf20a..845ee9006 100644 --- a/src/searchengine/nova3/engines/legittorrents.py +++ b/src/searchengine/nova3/engines/legittorrents.py @@ -1,4 +1,4 @@ -#VERSION: 2.00 +#VERSION: 2.01 #AUTHORS: Christophe Dumez (chris@qbittorrent.org) # Douman (custparasite@gmx.se) @@ -61,7 +61,7 @@ class legittorrents(object): elif link.startswith("download"): self.current_item["link"] = "/".join((self.url, link)) elif tag == "td": - if "class" in params and params["class"].startswith("#FF"): + if "width" in params and params["width"] == "30": self.save_item_key = "leech" if "seeds" in self.current_item else "seeds" elif tag == "tr": diff --git a/src/searchengine/nova3/engines/versions.txt b/src/searchengine/nova3/engines/versions.txt index a2cb946a0..d9c6fdccb 100644 --- a/src/searchengine/nova3/engines/versions.txt +++ b/src/searchengine/nova3/engines/versions.txt @@ -2,7 +2,7 @@ btdigg: 1.31 demonoid: 1.2 extratorrent: 2.04 kickasstorrents: 1.28 -legittorrents: 2.00 +legittorrents: 2.01 mininova: 2.02 piratebay: 2.14 torlock: 2.0