diff options
| author | useralias <212567668+useralias@users.noreply.github.com> | 2025-05-20 15:46:49 +0000 |
|---|---|---|
| committer | Bnyro <bnyro@tutanota.com> | 2025-05-20 21:02:40 +0200 |
| commit | 6ec554cb5b014dc362c9dc6c4618a6614199911d (patch) | |
| tree | 49e8da9da93980ecee5515fe4c7db6bb85fc69cf /searx/engines/yahoo.py | |
| parent | 7a3742ae56cc983667407283e1acc3640bd72bbe (diff) | |
[fix] yahoo: url and title xpath
Diffstat (limited to 'searx/engines/yahoo.py')
| -rw-r--r-- | searx/engines/yahoo.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/engines/yahoo.py b/searx/engines/yahoo.py index a882c6947..92da30e23 100644 --- a/searx/engines/yahoo.py +++ b/searx/engines/yahoo.py @@ -159,12 +159,12 @@ def response(resp): # parse results for result in eval_xpath_list(dom, '//div[contains(@class,"algo-sr")]'): - url = eval_xpath_getindex(result, './/h3/a/@href', 0, default=None) + url = eval_xpath_getindex(result, './/div[contains(@class,"compTitle")]/a/@href', 0, default=None) if url is None: continue url = parse_url(url) - title = eval_xpath_getindex(result, './/h3//a/@aria-label', 0, default='') + title = eval_xpath_getindex(result, './/div[contains(@class,"compTitle")]/a/h3/span', 0, default='') title: str = extract_text(title) content = eval_xpath_getindex(result, './/div[contains(@class, "compText")]', 0, default='') content: str = extract_text(content, allow_none=True) |