Fixed extratorrent search not working Closes #5736 #5753

The original code accumulates all the <td> texts between the description
link and the number of seeders into self.current_item["size"]:
    <td>248.72</td><td>&nbsp;MB<td> => "248.72 MB".
ExtraTorrents changed the table design, added the Added column and joined
the number and its unit:
    <td>8d</td><td>248.72&nbsp;MB</td> => "8d 248.72 MB"
This commit stores only the last <td> text in self.current_item["size"].
This commit is contained in:
Yez Ezey 2016-09-17 22:21:16 +09:00
parent 3ea81be2cc
commit 3a744a954b
4 changed files with 6 additions and 10 deletions

View File

@ -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

View File

@ -1,5 +1,5 @@
demonoid: 1.21
extratorrent: 2.04
extratorrent: 2.05
legittorrents: 2.01
mininova: 2.02
piratebay: 2.15

View File

@ -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

View File

@ -1,5 +1,5 @@
demonoid: 1.21
extratorrent: 2.04
extratorrent: 2.05
legittorrents: 2.01
mininova: 2.02
piratebay: 2.15