From b8c4a86348142bd35d4c740c89f734bc788163b8 Mon Sep 17 00:00:00 2001 From: ngosang Date: Thu, 7 Jan 2016 01:41:16 +0100 Subject: [PATCH] [search engine] Fix PirateBay plugin implementation for Python 3 --- src/searchengine/nova3/engines/piratebay.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/searchengine/nova3/engines/piratebay.py b/src/searchengine/nova3/engines/piratebay.py index 9b7e78be0..8774f53e6 100644 --- a/src/searchengine/nova3/engines/piratebay.py +++ b/src/searchengine/nova3/engines/piratebay.py @@ -141,10 +141,8 @@ class piratebay(object): if self.save_item == "size": temp_data = data.split() if "Size" in temp_data: - self.current_item[self.save_item] = temp_data[2] - elif "ULed" in temp_data: - temp_string = self.current_item[self.save_item] - self.current_item[self.save_item] = " ".join((temp_string, temp_data[0][:-1])) + indx = temp_data.index("Size") + self.current_item[self.save_item] = temp_data[indx + 1] + " " + temp_data[indx + 2] elif self.save_item == "name": # names with special characters like '&' are splitted in several pieces