mirror of
https://github.com/searxng/searxng.git
synced 2026-07-27 02:11:23 +00:00
Compare commits
2 Commits
e7501eaedf
...
905b13aa7e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
905b13aa7e | ||
|
|
314924bc0e |
@@ -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),
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -1733,6 +1733,7 @@ engines:
|
||||
- name: public domain image archive
|
||||
engine: public_domain_image_archive
|
||||
shortcut: pdia
|
||||
disabled: true
|
||||
|
||||
- name: pubmed
|
||||
engine: pubmed
|
||||
|
||||
Reference in New Issue
Block a user