on master help sign in
[fix] google videos engine
commit0bdf090ed70ee0c3bf9e42dab0679fe67a1a50f6 authorVenca24 <Vaclav.Zouzalik@seznam.cz> dateThu 22 Nov 2018, 13:00 (8 years ago) parentbc7c8a3
1 file changed+3−3
searx/engines/google_videos.py+3−3
searx/engines/google_videos.py+3−3
@@ -25,7 +25,7 @@ time_range_support = True
2525number_of_results = 10
2626
2727search_url = 'https://www.google.com/search'\
28− '?{query}'\
28+ '?q={query}'\
2929 '&tbm=vid'\
3030 '&{search_options}'
3131time_range_attr = "qdr:{range}"
@@ -69,8 +69,8 @@ def response(resp):
6969 # parse results
7070 for result in dom.xpath('//div[@class="g"]'):
7171
72− title = extract_text(result.xpath('.//h3/a'))
73− url = result.xpath('.//h3/a/@href')[0]
72+ title = extract_text(result.xpath('.//h3'))
73+ url = result.xpath('.//div[@class="r"]/a/@href')[0]
7474 content = extract_text(result.xpath('.//span[@class="st"]'))
7575
7676 # append result