on master help sign in
[fix] google videos engine
0bdf090Venca24
searx/engines/google_videos.py+3−3
@@ -25,7 +25,7 @@ time_range_support = True
25number_of_results = 10
25number_of_results = 10
26
26
27search_url = 'https://www.google.com/search'\
27search_url = 'https://www.google.com/search'\
28− '?{query}'\
28+ '?q={query}'\
29 '&tbm=vid'\
29 '&tbm=vid'\
30 '&{search_options}'
30 '&{search_options}'
31time_range_attr = "qdr:{range}"
31time_range_attr = "qdr:{range}"
@@ -69,8 +69,8 @@ def response(resp):
69 # parse results
69 # parse results
70 for result in dom.xpath('//div[@class="g"]'):
70 for result in dom.xpath('//div[@class="g"]'):
71
71
72− title = extract_text(result.xpath('.//h3/a'))
72+ title = extract_text(result.xpath('.//h3'))
73− url = result.xpath('.//h3/a/@href')[0]
73+ url = result.xpath('.//div[@class="r"]/a/@href')[0]
74 content = extract_text(result.xpath('.//span[@class="st"]'))
74 content = extract_text(result.xpath('.//span[@class="st"]'))
75
75
76 # append result
76 # append result