[Search engine] Fix Torrentz plugin for Python2

This commit is contained in:
ngosang 2016-04-23 21:57:05 +02:00
parent f22aee2bff
commit e4349e8db1
2 changed files with 5 additions and 6 deletions

View file

@ -1,4 +1,4 @@
#VERSION: 2.18 #VERSION: 2.19
#AUTHORS: Diego de las Heras (ngosang@hotmail.es) #AUTHORS: Diego de las Heras (ngosang@hotmail.es)
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -92,10 +92,9 @@ class torrentz(object):
# display item # display item
self.td_counter = None self.td_counter = None
self.current_item['engine_url'] = self.url self.current_item['engine_url'] = self.url
if self.current_item['name'].find(u' \xc2'): if self.current_item['name'].find(u' \xbb'):
self.current_item['name'] = self.current_item['name'].split(u' \xc2')[0] self.current_item['name'] = self.current_item['name'].split(u' \xbb')[0]
self.current_item['link'] += '&' + urlencode({'dn' : self.current_item['name']}) self.current_item['link'] += '&' + urlencode({'dn' : self.current_item['name'].encode('utf-8')})
self.current_item['name'] = self.current_item['name'].decode('utf8')
prettyPrinter(self.current_item) prettyPrinter(self.current_item)
self.results.append('a') self.results.append('a')

View file

@ -7,4 +7,4 @@ mininova: 2.01
piratebay: 2.14 piratebay: 2.14
torlock: 2.0 torlock: 2.0
torrentreactor: 1.41 torrentreactor: 1.41
torrentz: 2.18 torrentz: 2.19