forked from Ponysearch/Ponysearch
Merge pull request #1102 from allendema/ebay-domains
[mod] Pass desired ebay domain in settings
This commit is contained in:
commit
52298d676d
2 changed files with 6 additions and 3 deletions
|
@ -20,8 +20,10 @@ about = {
|
||||||
categories = ['shopping']
|
categories = ['shopping']
|
||||||
paging = True
|
paging = True
|
||||||
|
|
||||||
url = 'https://www.ebay.com'
|
# Set base_url in settings.yml in order to
|
||||||
search_url = url + '/sch/i.html?_nkw={query}&_sacat={pageno}'
|
# have the desired local TLD.
|
||||||
|
base_url = None
|
||||||
|
search_url = '/sch/i.html?_nkw={query}&_sacat={pageno}'
|
||||||
|
|
||||||
results_xpath = '//li[contains(@class, "s-item")]'
|
results_xpath = '//li[contains(@class, "s-item")]'
|
||||||
url_xpath = './/a[@class="s-item__link"]/@href'
|
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):
|
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
|
return params
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -514,6 +514,7 @@ engines:
|
||||||
# - name: ebay
|
# - name: ebay
|
||||||
# engine: ebay
|
# engine: ebay
|
||||||
# shortcut: eb
|
# shortcut: eb
|
||||||
|
# base_url: 'https://www.ebay.com'
|
||||||
# disabled: true
|
# disabled: true
|
||||||
# timeout: 5
|
# timeout: 5
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue