From 3a744a954b07e5b364f3a39d459482a0dfa53bb8 Mon Sep 17 00:00:00 2001 From: Yez Ezey Date: Sat, 17 Sep 2016 22:21:16 +0900 Subject: [PATCH] Fixed extratorrent search not working Closes #5736 #5753 The original code accumulates all the texts between the description link and the number of seeders into self.current_item["size"]: 248.72 MB => "248.72 MB". ExtraTorrents changed the table design, added the Added column and joined the number and its unit: 8d248.72 MB => "8d 248.72 MB" This commit stores only the last text in self.current_item["size"]. --- src/searchengine/nova/engines/extratorrent.py | 6 ++---- src/searchengine/nova/engines/versions.txt | 2 +- src/searchengine/nova3/engines/extratorrent.py | 6 ++---- src/searchengine/nova3/engines/versions.txt | 2 +- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/searchengine/nova/engines/extratorrent.py b/src/searchengine/nova/engines/extratorrent.py index cf33a1af3..ca3316a7b 100644 --- a/src/searchengine/nova/engines/extratorrent.py +++ b/src/searchengine/nova/engines/extratorrent.py @@ -1,4 +1,4 @@ -#VERSION: 2.04 +#VERSION: 2.05 #AUTHORS: Christophe Dumez (chris@qbittorrent.org) #CONTRIBUTORS: Diego de las Heras (ngosang@hotmail.es) @@ -125,9 +125,7 @@ class extratorrent(object): def handle_data(self, data): if self.cur_item_name: - temp = self.current_item[self.cur_item_name] - self.current_item[self.cur_item_name] = " ".join((temp, data)) - #Due to utf-8 we need to handle data two times if there is space + self.current_item[self.cur_item_name] = data if not self.cur_item_name == "size": self.cur_item_name = None diff --git a/src/searchengine/nova/engines/versions.txt b/src/searchengine/nova/engines/versions.txt index 2f5f815ec..442f1f950 100644 --- a/src/searchengine/nova/engines/versions.txt +++ b/src/searchengine/nova/engines/versions.txt @@ -1,5 +1,5 @@ demonoid: 1.21 -extratorrent: 2.04 +extratorrent: 2.05 legittorrents: 2.01 mininova: 2.02 piratebay: 2.15 diff --git a/src/searchengine/nova3/engines/extratorrent.py b/src/searchengine/nova3/engines/extratorrent.py index 06a53db2d..3b205d30c 100644 --- a/src/searchengine/nova3/engines/extratorrent.py +++ b/src/searchengine/nova3/engines/extratorrent.py @@ -1,4 +1,4 @@ -#VERSION: 2.04 +#VERSION: 2.05 #AUTHORS: Christophe Dumez (chris@qbittorrent.org) #CONTRIBUTORS: Diego de las Heras (ngosang@hotmail.es) @@ -125,9 +125,7 @@ class extratorrent(object): def handle_data(self, data): if self.cur_item_name: - temp = self.current_item[self.cur_item_name] - self.current_item[self.cur_item_name] = " ".join((temp, data)) - #Due to utf-8 we need to handle data two times if there is space + self.current_item[self.cur_item_name] = data if not self.cur_item_name == "size": self.cur_item_name = None diff --git a/src/searchengine/nova3/engines/versions.txt b/src/searchengine/nova3/engines/versions.txt index 2f5f815ec..442f1f950 100644 --- a/src/searchengine/nova3/engines/versions.txt +++ b/src/searchengine/nova3/engines/versions.txt @@ -1,5 +1,5 @@ demonoid: 1.21 -extratorrent: 2.04 +extratorrent: 2.05 legittorrents: 2.01 mininova: 2.02 piratebay: 2.15