49def response(resp):
50 if resp.url.path.startswith('/verify'):
51 raise SearxEngineAccessDeniedException()
52
53 results = []
54
55 dom = html.fromstring(resp.content.decode())
56 for result_element in eval_xpath_list(
57 dom, '//div[@id="searchpage-root"]//div[@class="Layout--left"]/div[@class="f2c528"]'
58 ):
59 result_data = eval_xpath_getindex(
60 result_element, './/div[@class="c8774a" or @class="e69e8d a11657"]', 0, default=None
61 )
62 if result_data is None:
63 continue
64 title_element = eval_xpath_getindex(result_element, './/h3/a', 0)
65 results.append(
66 {
67 'url': title_element.get('href'),
68 'title': extract_text(title_element),
69 'content': extract_text(result_data),
70 }
71 )
72
73 return results