mirror of
https://github.com/searxng/searxng.git
synced 2024-11-23 03:11:00 +00:00
[fix] google markup change - closes #489
This commit is contained in:
parent
44c7eac958
commit
66f48c2bf5
2 changed files with 12 additions and 12 deletions
|
@ -90,7 +90,7 @@ url_map = 'https://www.openstreetmap.org/'\
|
||||||
search_path = '/search'
|
search_path = '/search'
|
||||||
search_url = ('https://{hostname}' +
|
search_url = ('https://{hostname}' +
|
||||||
search_path +
|
search_path +
|
||||||
'?{query}&start={offset}&gbv=1&gws_rd=cr')
|
'?{query}&start={offset}&gbv=1&gws_rd=ssl')
|
||||||
|
|
||||||
# other URLs
|
# other URLs
|
||||||
map_hostname_start = 'maps.google.'
|
map_hostname_start = 'maps.google.'
|
||||||
|
@ -99,7 +99,7 @@ redirect_path = '/url'
|
||||||
images_path = '/images'
|
images_path = '/images'
|
||||||
|
|
||||||
# specific xpath variables
|
# specific xpath variables
|
||||||
results_xpath = '//li[@class="g"]'
|
results_xpath = '//div[@class="g"]'
|
||||||
url_xpath = './/h3/a/@href'
|
url_xpath = './/h3/a/@href'
|
||||||
title_xpath = './/h3'
|
title_xpath = './/h3'
|
||||||
content_xpath = './/span[@class="st"]'
|
content_xpath = './/span[@class="st"]'
|
||||||
|
|
|
@ -40,7 +40,7 @@ class TestGoogleEngine(SearxTestCase):
|
||||||
self.assertEqual(google.response(response), [])
|
self.assertEqual(google.response(response), [])
|
||||||
|
|
||||||
html = """
|
html = """
|
||||||
<li class="g">
|
<div class="g">
|
||||||
<h3 class="r">
|
<h3 class="r">
|
||||||
<a href="http://this.should.be.the.link/">
|
<a href="http://this.should.be.the.link/">
|
||||||
<b>This</b> is <b>the</b> title
|
<b>This</b> is <b>the</b> title
|
||||||
|
@ -94,35 +94,35 @@ class TestGoogleEngine(SearxTestCase):
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</div>
|
||||||
<li class="g">
|
<div class="g">
|
||||||
<h3 class="r">
|
<h3 class="r">
|
||||||
<a href="http://www.google.com/images?q=toto">
|
<a href="http://www.google.com/images?q=toto">
|
||||||
<b>This</b>
|
<b>This</b>
|
||||||
</a>
|
</a>
|
||||||
</h3>
|
</h3>
|
||||||
</li>
|
</div>
|
||||||
<li class="g">
|
<div class="g">
|
||||||
<h3 class="r">
|
<h3 class="r">
|
||||||
<a href="http://www.google.com/search?q=toto">
|
<a href="http://www.google.com/search?q=toto">
|
||||||
<b>This</b> is
|
<b>This</b> is
|
||||||
</a>
|
</a>
|
||||||
</h3>
|
</h3>
|
||||||
</li>
|
</div>
|
||||||
<li class="g">
|
<div class="g">
|
||||||
<h3 class="r">
|
<h3 class="r">
|
||||||
<a href="€">
|
<a href="€">
|
||||||
<b>This</b> is <b>the</b>
|
<b>This</b> is <b>the</b>
|
||||||
</a>
|
</a>
|
||||||
</h3>
|
</h3>
|
||||||
</li>
|
</div>
|
||||||
<li class="g">
|
<div class="g">
|
||||||
<h3 class="r">
|
<h3 class="r">
|
||||||
<a href="/url?q=url">
|
<a href="/url?q=url">
|
||||||
<b>This</b> is <b>the</b>
|
<b>This</b> is <b>the</b>
|
||||||
</a>
|
</a>
|
||||||
</h3>
|
</h3>
|
||||||
</li>
|
</div>
|
||||||
<p class="_Bmc" style="margin:3px 8px">
|
<p class="_Bmc" style="margin:3px 8px">
|
||||||
<a href="/search?num=20&safe=off&q=t&revid=1754833769&sa=X&ei=-&ved=">
|
<a href="/search?num=20&safe=off&q=t&revid=1754833769&sa=X&ei=-&ved=">
|
||||||
suggestion <b>title</b>
|
suggestion <b>title</b>
|
||||||
|
|
Loading…
Reference in a new issue