diff options
author | Alexandre Flament <alex@al-f.net> | 2020-11-26 15:49:33 +0100 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2020-12-03 10:22:48 +0100 |
commit | ad72803ed98760b2a95690dea3b95eacc670427c (patch) | |
tree | 7e8515b6c4752baedb5e80588c9041bc72cdeb04 /searx/engines/archlinux.py | |
parent | de887c6347db4c810f7d1e11c77633340d4e2fbd (diff) | |
download | searxng-ad72803ed98760b2a95690dea3b95eacc670427c.tar.gz searxng-ad72803ed98760b2a95690dea3b95eacc670427c.zip |
[mod] xpath, 1337x, acgsou, apkmirror, archlinux, arxiv: use eval_xpath_* functions
Diffstat (limited to 'searx/engines/archlinux.py')
-rw-r--r-- | searx/engines/archlinux.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/searx/engines/archlinux.py b/searx/engines/archlinux.py index 8f93f4f38..04117c07d 100644 --- a/searx/engines/archlinux.py +++ b/searx/engines/archlinux.py @@ -13,7 +13,7 @@ from urllib.parse import urlencode, urljoin from lxml import html -from searx.utils import extract_text +from searx.utils import extract_text, eval_xpath_list, eval_xpath_getindex # engine dependent config categories = ['it'] @@ -131,8 +131,8 @@ def response(resp): dom = html.fromstring(resp.text) # parse results - for result in dom.xpath(xpath_results): - link = result.xpath(xpath_link)[0] + for result in eval_xpath_list(dom, xpath_results): + link = eval_xpath_getindex(result, xpath_link, 0) href = urljoin(base_url, link.attrib.get('href')) title = extract_text(link) |