From e4349e8db180442a691877b98c2c9fa4547346d5 Mon Sep 17 00:00:00 2001 From: ngosang Date: Sat, 23 Apr 2016 21:57:05 +0200 Subject: [PATCH] [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