Browse Source

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"].
adaptive-webui-19844
Yez Ezey 8 years ago
parent
commit
3a744a954b
  1. 6
      src/searchengine/nova/engines/extratorrent.py
  2. 2
      src/searchengine/nova/engines/versions.txt
  3. 6
      src/searchengine/nova3/engines/extratorrent.py
  4. 2
      src/searchengine/nova3/engines/versions.txt

6
src/searchengine/nova/engines/extratorrent.py

@ -1,4 +1,4 @@ @@ -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): @@ -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

2
src/searchengine/nova/engines/versions.txt

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

6
src/searchengine/nova3/engines/extratorrent.py

@ -1,4 +1,4 @@ @@ -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): @@ -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

2
src/searchengine/nova3/engines/versions.txt

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

Loading…
Cancel
Save