forked from Icycoide/searxng
[refactor] duration strings: move parsing logic to utils.py
This commit is contained in:
parent
c28d35c7fc
commit
4dfc47584d
5 changed files with 42 additions and 42 deletions
|
@ -73,7 +73,7 @@ Implementations
|
|||
from urllib.parse import urlencode, urlparse
|
||||
from searx import locales
|
||||
from searx.network import get
|
||||
from searx.utils import gen_useragent, html_to_text
|
||||
from searx.utils import gen_useragent, html_to_text, parse_duration_string
|
||||
|
||||
about = {
|
||||
"website": "https://presearch.io",
|
||||
|
@ -270,7 +270,7 @@ def response(resp):
|
|||
'url': item.get('link'),
|
||||
'content': item.get('description', ''),
|
||||
'thumbnail': item.get('image'),
|
||||
'length': item.get('duration'),
|
||||
'length': parse_duration_string(item.get('duration')),
|
||||
}
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue