forked from zaclys/searxng
Merge pull request #227 from return42/fix-seznam
[fix] Seznam engine - some XPath selectors has been changed
This commit is contained in:
commit
c5cfc24467
|
@ -53,14 +53,14 @@ def response(resp):
|
|||
|
||||
dom = html.fromstring(resp.content.decode())
|
||||
for result_element in eval_xpath_list(dom, '//div[@data-dot="results"]/div'):
|
||||
result_data = eval_xpath_getindex(result_element, './/div[contains(@class, "Result")]', 0, default=None)
|
||||
result_data = eval_xpath_getindex(result_element, './/div[contains(@class, "bec586")]', 0, default=None)
|
||||
if result_data is None:
|
||||
continue
|
||||
title_element = eval_xpath_getindex(result_element, './/h3/a', 0)
|
||||
results.append({
|
||||
'url': title_element.get('href'),
|
||||
'title': extract_text(title_element),
|
||||
'content': extract_text(eval_xpath(result_data, './/p[@class="Result-description"]')),
|
||||
'content': extract_text(eval_xpath(result_data, './/div[@class="_3eded7"]')),
|
||||
})
|
||||
|
||||
return results
|
||||
|
|
Loading…
Reference in New Issue