2 Commits

Author SHA1 Message Date
Austin-Olacsi
905b13aa7e [feat] naver engine: add video embeds 2025-09-09 17:04:21 +02:00
Brock Vojkovic
314924bc0e [upd] disable public domain image archive engine by default 2025-09-09 16:58:27 +08:00
2 changed files with 7 additions and 2 deletions

View File

@@ -16,6 +16,7 @@ from searx.utils import (
html_to_text,
parse_duration_string,
js_variable_to_python,
get_embeded_stream_url,
)
# engine metadata
@@ -185,6 +186,8 @@ def parse_videos(data):
dom = html.fromstring(data)
for item in eval_xpath_list(dom, "//li[contains(@class, 'video_item')]"):
url = eval_xpath_getindex(item, ".//a[contains(@class, 'info_title')]/@href", 0)
thumbnail = None
try:
thumbnail = eval_xpath_getindex(item, ".//img[contains(@class, 'thumb')]/@src", 0)
@@ -201,9 +204,10 @@ def parse_videos(data):
{
"template": "videos.html",
"title": extract_text(eval_xpath(item, ".//a[contains(@class, 'info_title')]")),
"url": eval_xpath_getindex(item, ".//a[contains(@class, 'info_title')]/@href", 0),
"url": url,
"thumbnail": thumbnail,
'length': length,
"length": length,
"iframe_src": get_embeded_stream_url(url),
}
)

View File

@@ -1733,6 +1733,7 @@ engines:
- name: public domain image archive
engine: public_domain_image_archive
shortcut: pdia
disabled: true
- name: pubmed
engine: pubmed