forked from Ponysearch/Ponysearch
[fix] rumble redirect
This commit is contained in:
parent
b701ee257b
commit
41ef73ca3a
1 changed files with 5 additions and 4 deletions
|
@ -23,9 +23,7 @@ categories = ['videos']
|
||||||
paging = True
|
paging = True
|
||||||
|
|
||||||
# search-url
|
# search-url
|
||||||
base_url = 'https://rumble.com'
|
base_url = 'https://rumble.com/'
|
||||||
# https://rumble.com/search/video?q=searx&page=3
|
|
||||||
search_url = base_url + '/search/video?{query}&page={pageno}'
|
|
||||||
|
|
||||||
url_xpath = './/a[@class="video-item--a"]/@href'
|
url_xpath = './/a[@class="video-item--a"]/@href'
|
||||||
thumbnail_xpath = './/img[@class="video-item--img"]/@src'
|
thumbnail_xpath = './/img[@class="video-item--img"]/@src'
|
||||||
|
@ -39,7 +37,10 @@ length_xpath = './/span[@class="video-item--duration"]/@data-value'
|
||||||
|
|
||||||
|
|
||||||
def request(query, params):
|
def request(query, params):
|
||||||
params['url'] = search_url.format(pageno=params['pageno'], query=urlencode({'q': query}))
|
args = {"q": query}
|
||||||
|
if params["pageno"] > 1:
|
||||||
|
args['page'] = params["pageno"]
|
||||||
|
params['url'] = f'{base_url}search/video?{urlencode(args)}'
|
||||||
return params
|
return params
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue