mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
[perf] torrents.html, files.html: don't parse and re-format filesize
This commit is contained in:
parent
16ce5612dd
commit
e9f8412a6e
13 changed files with 23 additions and 86 deletions
|
|
@ -14,7 +14,6 @@ from searx.utils import (
|
|||
eval_xpath,
|
||||
eval_xpath_getindex,
|
||||
eval_xpath_list,
|
||||
get_torrent_size,
|
||||
)
|
||||
|
||||
about = {
|
||||
|
|
@ -63,7 +62,7 @@ def response(resp):
|
|||
'leech': extract_text(stats[2]),
|
||||
'title': extract_text(title),
|
||||
'url': resp.search_params['base_url'] + url,
|
||||
'filesize': get_torrent_size(*extract_text(stats[1]).split()),
|
||||
'filesize': extract_text(stats[1]),
|
||||
'magnetlink': magnet,
|
||||
'torrentfile': torrentfile,
|
||||
'metadata': extract_text(categ),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue