1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-22 12:10:11 +01:00

[fix] engine google_video: google has changed the layout of the rsponse

Closes: https://github.com/searxng/searxng/issues/2664
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2023-08-22 08:10:19 +02:00 committed by Markus Heiser
parent d52919cc3e
commit 4b42644579

View File

@ -114,10 +114,9 @@ def response(resp):
title = extract_text(eval_xpath_getindex(result, './/a/h3[1]', 0)) title = extract_text(eval_xpath_getindex(result, './/a/h3[1]', 0))
url = eval_xpath_getindex(result, './/a/h3[1]/../@href', 0) url = eval_xpath_getindex(result, './/a/h3[1]/../@href', 0)
c_node = eval_xpath_getindex(result, './/div[@class="Uroaid"]', 0) c_node = eval_xpath_getindex(result, './/div[@class="ITZIwc"]', 0)
content = extract_text(c_node) content = extract_text(c_node)
pub_info = extract_text(eval_xpath(result, './/div[@class="P7xzyf"]')) pub_info = extract_text(eval_xpath(result, './/div[@class="gqF9jc"]'))
length = extract_text(eval_xpath(result, './/div[@class="J1mWY"]'))
results.append( results.append(
{ {
@ -126,7 +125,6 @@ def response(resp):
'content': content, 'content': content,
'author': pub_info, 'author': pub_info,
'thumbnail': img_src, 'thumbnail': img_src,
'length': length,
'template': 'videos.html', 'template': 'videos.html',
} }
) )