summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--searx/engines/piratebay.py2
-rw-r--r--searx/webapp.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/searx/engines/piratebay.py b/searx/engines/piratebay.py
index a7e1becc4..95ab884d5 100644
--- a/searx/engines/piratebay.py
+++ b/searx/engines/piratebay.py
@@ -5,7 +5,7 @@ from urllib import quote
categories = ['videos', 'music']
-url = 'https://thepiratebay.sx/'
+url = 'https://thepiratebay.se/'
search_url = url + 'search/{search_term}/0/99/{search_type}'
search_types = {'videos': '200'
,'music' : '100'
diff --git a/searx/webapp.py b/searx/webapp.py
index 20534416f..c95cae2c2 100644
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -91,6 +91,11 @@ def index():
continue
selected_categories.append(category)
if not len(selected_categories):
+ cookie_categories = request.cookies.get('categories', '').split(',')
+ for ccateg in cookie_categories:
+ if ccateg in categories:
+ selected_categories.append(ccateg)
+ if not len(selected_categories):
selected_categories = ['general']
for categ in selected_categories: