summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
authorJustas Zabulionis <38244149+jazzzooo@users.noreply.github.com>2023-09-14 03:08:38 -0700
committerMarkus Heiser <markus.heiser@darmarIT.de>2023-09-14 19:21:21 +0200
commit41ef73ca3a7c54ff6d12303f4f35b097cb7e9ec0 (patch)
tree610e3c02c72f9fe5817b4fc2b5fa79c97212547f /searx
parentb701ee257bdec82a41289c7862da47296ebe058e (diff)
downloadsearxng-41ef73ca3a7c54ff6d12303f4f35b097cb7e9ec0.tar.gz
searxng-41ef73ca3a7c54ff6d12303f4f35b097cb7e9ec0.zip
[fix] rumble redirect
Diffstat (limited to 'searx')
-rw-r--r--searx/engines/rumble.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/searx/engines/rumble.py b/searx/engines/rumble.py
index beca2570c..e4a50c732 100644
--- a/searx/engines/rumble.py
+++ b/searx/engines/rumble.py
@@ -23,9 +23,7 @@ categories = ['videos']
paging = True
# search-url
-base_url = 'https://rumble.com'
-# https://rumble.com/search/video?q=searx&page=3
-search_url = base_url + '/search/video?{query}&page={pageno}'
+base_url = 'https://rumble.com/'
url_xpath = './/a[@class="video-item--a"]/@href'
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):
- 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