Merge pull request #4525 from ngosang/tpb

[search engine] Update PirateBay plugin. Closes #4470
This commit is contained in:
sledgehammer999 2016-01-10 06:24:17 -06:00
commit 6d4a828698
4 changed files with 10 additions and 12 deletions

View file

@ -1,4 +1,4 @@
#VERSION: 2.11 #VERSION: 2.12
#AUTHORS: Fabien Devaux (fab@gnux.info) #AUTHORS: Fabien Devaux (fab@gnux.info)
#CONTRIBUTORS: Christophe Dumez (chris@qbittorrent.org) #CONTRIBUTORS: Christophe Dumez (chris@qbittorrent.org)
# Arthur (custparasite@gmx.se) # Arthur (custparasite@gmx.se)
@ -36,7 +36,7 @@ from helpers import download_file
class piratebay(object): class piratebay(object):
""" Search engine class """ """ Search engine class """
url = 'https://thepiratebay.gd' url = 'https://thepiratebay.ms'
name = 'The Pirate Bay' name = 'The Pirate Bay'
supported_categories = {'all': '0', 'music': '100', 'movies': '200', 'games': '400', 'software': '300'} supported_categories = {'all': '0', 'music': '100', 'movies': '200', 'games': '400', 'software': '300'}
@ -159,7 +159,7 @@ class piratebay(object):
def search(self, what, cat='all'): def search(self, what, cat='all'):
""" Performs search """ """ Performs search """
connection = https("thepiratebay.gd") connection = https("thepiratebay.ms")
#prepare query. 7 is filtering by seeders #prepare query. 7 is filtering by seeders
cat = cat.lower() cat = cat.lower()

View file

@ -4,6 +4,6 @@ extratorrent: 2.02
kickasstorrents: 1.28 kickasstorrents: 1.28
legittorrents: 2.00 legittorrents: 2.00
mininova: 2.00 mininova: 2.00
piratebay: 2.11 piratebay: 2.12
torrentreactor: 1.40 torrentreactor: 1.40
torrentz: 2.17 torrentz: 2.17

View file

@ -1,4 +1,4 @@
#VERSION: 2.11 #VERSION: 2.12
#AUTHORS: Fabien Devaux (fab@gnux.info) #AUTHORS: Fabien Devaux (fab@gnux.info)
#CONTRIBUTORS: Christophe Dumez (chris@qbittorrent.org) #CONTRIBUTORS: Christophe Dumez (chris@qbittorrent.org)
# Arthur (custparasite@gmx.se) # Arthur (custparasite@gmx.se)
@ -36,7 +36,7 @@ from helpers import download_file
class piratebay(object): class piratebay(object):
""" Search engine class """ """ Search engine class """
url = 'https://thepiratebay.gd' url = 'https://thepiratebay.ms'
name = 'The Pirate Bay' name = 'The Pirate Bay'
supported_categories = {'all': '0', 'music': '100', 'movies': '200', 'games': '400', 'software': '300'} supported_categories = {'all': '0', 'music': '100', 'movies': '200', 'games': '400', 'software': '300'}
@ -141,10 +141,8 @@ class piratebay(object):
if self.save_item == "size": if self.save_item == "size":
temp_data = data.split() temp_data = data.split()
if "Size" in temp_data: if "Size" in temp_data:
self.current_item[self.save_item] = temp_data[2] indx = temp_data.index("Size")
elif "ULed" in temp_data: self.current_item[self.save_item] = temp_data[indx + 1] + " " + temp_data[indx + 2]
temp_string = self.current_item[self.save_item]
self.current_item[self.save_item] = " ".join((temp_string, temp_data[0][:-1]))
elif self.save_item == "name": elif self.save_item == "name":
# names with special characters like '&' are splitted in several pieces # names with special characters like '&' are splitted in several pieces
@ -159,7 +157,7 @@ class piratebay(object):
def search(self, what, cat='all'): def search(self, what, cat='all'):
""" Performs search """ """ Performs search """
connection = https("thepiratebay.gd") connection = https("thepiratebay.ms")
#prepare query. 7 is filtering by seeders #prepare query. 7 is filtering by seeders
cat = cat.lower() cat = cat.lower()

View file

@ -4,6 +4,6 @@ extratorrent: 2.02
kickasstorrents: 1.28 kickasstorrents: 1.28
legittorrents: 2.00 legittorrents: 2.00
mininova: 2.00 mininova: 2.00
piratebay: 2.11 piratebay: 2.12
torrentreactor: 1.40 torrentreactor: 1.40
torrentz: 2.17 torrentz: 2.17