diff options
author | Allen <64094914+allendema@users.noreply.github.com> | 2022-04-16 19:10:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-16 19:10:35 +0200 |
commit | 15862ebc35ceae6d87c4161f5dcd07b6ab31de4a (patch) | |
tree | 7dbb5f527f1cf9742e9ada1c5a026ebfa07b7ad0 /searx/engines/ebay.py | |
parent | c474616642890af97ce79700baff7dd47b2406b1 (diff) | |
download | searxng-15862ebc35ceae6d87c4161f5dcd07b6ab31de4a.tar.gz searxng-15862ebc35ceae6d87c4161f5dcd07b6ab31de4a.zip |
[mod] Pass desired ebay domain in settings
https://www.ebay.de
https://www.ebay.com
htttps://www.ebay.es
etc
Diffstat (limited to 'searx/engines/ebay.py')
-rw-r--r-- | searx/engines/ebay.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/searx/engines/ebay.py b/searx/engines/ebay.py index b7aefcb44..07870f044 100644 --- a/searx/engines/ebay.py +++ b/searx/engines/ebay.py @@ -20,8 +20,10 @@ about = { categories = ['shopping'] paging = True -url = 'https://www.ebay.com' -search_url = url + '/sch/i.html?_nkw={query}&_sacat={pageno}' +# Set base_url in settings.yml in order to +# have the desired local TLD. +base_url = None +search_url = '/sch/i.html?_nkw={query}&_sacat={pageno}' results_xpath = '//li[contains(@class, "s-item")]' url_xpath = './/a[@class="s-item__link"]/@href' @@ -34,7 +36,7 @@ thumbnail_xpath = './/img[@class="s-item__image-img"]/@src' def request(query, params): - params['url'] = search_url.format(query=quote(query), pageno=params['pageno']) + params['url'] = f'{base_url}' + search_url.format(query=quote(query), pageno=params['pageno']) return params |