diff options
| author | Bnyro <bnyro@tutanota.com> | 2024-06-12 22:35:13 +0200 |
|---|---|---|
| committer | Markus Heiser <markus.heiser@darmarIT.de> | 2024-06-15 15:42:29 +0200 |
| commit | e9f8412a6e4b399a3335da73b3d321104bb0c4fb (patch) | |
| tree | 0caf5c1bede7bb8739c5c2e5d107fa75455ecc24 /searx/engines/digbt.py | |
| parent | 16ce5612dd0ef426b6851ab97b248595f3933d8f (diff) | |
[perf] torrents.html, files.html: don't parse and re-format filesize
Diffstat (limited to 'searx/engines/digbt.py')
| -rw-r--r-- | searx/engines/digbt.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/engines/digbt.py b/searx/engines/digbt.py index ae78f1a9e..fd3d1fb16 100644 --- a/searx/engines/digbt.py +++ b/searx/engines/digbt.py @@ -5,7 +5,7 @@ from urllib.parse import urljoin from lxml import html -from searx.utils import extract_text, get_torrent_size +from searx.utils import extract_text # about about = { @@ -45,7 +45,7 @@ def response(resp): title = extract_text(result.xpath('.//a[@title]')) content = extract_text(result.xpath('.//div[@class="files"]')) files_data = extract_text(result.xpath('.//div[@class="tail"]')).split() - filesize = get_torrent_size(files_data[FILESIZE], files_data[FILESIZE_MULTIPLIER]) + filesize = f"{files_data[FILESIZE]} {files_data[FILESIZE_MULTIPLIER]}" magnetlink = result.xpath('.//div[@class="tail"]//a[@class="title"]/@href')[0] results.append( |