Merge pull request #2094 from xywei/xpath-handle-relative-url
Extract relative urls that do not start with / using xpath engine
commit7b71954d7e35147296669b06e87812d530d51ecb
authorAdam Tauber <asciimoo@gmail.com>
dateSat 25 Jul 2020, 03:53 (6 years ago)
parent9f2446c1d4657b
searx/engines/xpath.py+4
@@ -61,6 +61,10 @@ def extract_url(xpath_results, search_url):
6161 # fix relative url to the search engine
6262 url = urljoin(search_url, url)
6363
64+ # fix relative urls that fall through the crack
65+ if '://' not in url:
66+ url = urljoin(search_url, url)
67+
6468 # normalize url
6569 url = normalize_url(url)
6670