diff options
author | Adam Tauber <asciimoo@gmail.com> | 2020-07-25 03:53:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-25 03:53:38 +0200 |
commit | 7b71954d7e35147296669b06e87812d530d51ecb (patch) | |
tree | a69e37ced8be1619c9b8fb10816683cf1da4d2e1 | |
parent | 9f2446c44467d1ef6b85430996208bc2bdfa1b3a (diff) | |
parent | 1d4657b71427ec19a031883aab628f6ac50fdd9c (diff) | |
download | searxng-7b71954d7e35147296669b06e87812d530d51ecb.tar.gz searxng-7b71954d7e35147296669b06e87812d530d51ecb.zip |
Merge pull request #2094 from xywei/xpath-handle-relative-url
Extract relative urls that do not start with / using xpath engine
-rw-r--r-- | searx/engines/xpath.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/searx/engines/xpath.py b/searx/engines/xpath.py index b75896cc7..a9f3e4bdd 100644 --- a/searx/engines/xpath.py +++ b/searx/engines/xpath.py @@ -61,6 +61,10 @@ def extract_url(xpath_results, search_url): # fix relative url to the search engine url = urljoin(search_url, url) + # fix relative urls that fall through the crack + if '://' not in url: + url = urljoin(search_url, url) + # normalize url url = normalize_url(url) |