diff options
Diffstat (limited to 'searx/engines/btdigg.py')
-rw-r--r-- | searx/engines/btdigg.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/searx/engines/btdigg.py b/searx/engines/btdigg.py index 588d62093..193785182 100644 --- a/searx/engines/btdigg.py +++ b/searx/engines/btdigg.py @@ -6,7 +6,7 @@ from urllib.parse import quote, urljoin from lxml import html -from searx.utils import extract_text, get_torrent_size +from searx.utils import extract_text # about about = { @@ -58,13 +58,9 @@ def response(resp): content = content.strip().replace('\n', ' | ') content = ' '.join(content.split()) - filesize = result.xpath('.//span[@class="torrent_size"]/text()')[0].split()[0] - filesize_multiplier = result.xpath('.//span[@class="torrent_size"]/text()')[0].split()[1] + filesize = result.xpath('.//span[@class="torrent_size"]/text()')[0] files = (result.xpath('.//span[@class="torrent_files"]/text()') or ['1'])[0] - # convert filesize to byte if possible - filesize = get_torrent_size(filesize, filesize_multiplier) - # convert files to int if possible try: files = int(files) |