1
0
mirror of https://github.com/searx/searx synced 2024-11-25 19:30:01 +01:00

fix bing results sometimes still using bing redirect urls (#3482)

This commit is contained in:
br4nnigan 2023-04-04 21:26:44 +02:00 committed by GitHub
parent eb39a846f3
commit 38606234a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,11 +81,13 @@ def response(resp):
for result in eval_xpath(dom, '//li[@class="b_algo"]'):
link = eval_xpath(result, './/h2/a')[0]
url = link.attrib.get('href')
pretty_url = extract_text(eval_xpath(result, './/cite'))
title = extract_text(link)
content = extract_text(eval_xpath(result, './/p'))
# append result
results.append({'url': url,
'pretty_url': pretty_url,
'title': title,
'content': content})