Fix Seznam engine (#2905)

## What does this PR do?

Fixes the Seznam engine by updating XPath strings.

## Why is this change important?

Without this PR Seznam returns no results.

Co-authored-by: Noémi Ványi <kvch@users.noreply.github.com>
This commit is contained in:
Samuel Dudík 2021-08-02 20:09:31 +02:00 committed by GitHub
parent a5839a66d6
commit 13a608b0b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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