mirror of
https://github.com/searxng/searxng.git
synced 2026-01-13 10:10:39 +00:00
[fix] yep: fix 403 forbidden errors
Apparently, yep has been broken for a while. Measures to fix it: - only use HTTP/1.1, because our HTTP2 client gets fingerprinted and blocked - send the `Origin` HTTP header
This commit is contained in:
@@ -19,6 +19,8 @@ search_type = "web" # 'web', 'images', 'news'
|
|||||||
safesearch = True
|
safesearch = True
|
||||||
safesearch_map = {0: 'off', 1: 'moderate', 2: 'strict'}
|
safesearch_map = {0: 'off', 1: 'moderate', 2: 'strict'}
|
||||||
|
|
||||||
|
enable_http2 = False
|
||||||
|
|
||||||
|
|
||||||
def request(query, params):
|
def request(query, params):
|
||||||
args = {
|
args = {
|
||||||
@@ -30,6 +32,7 @@ def request(query, params):
|
|||||||
}
|
}
|
||||||
params['url'] = f"{base_url}/fs/2/search?{urlencode(args)}"
|
params['url'] = f"{base_url}/fs/2/search?{urlencode(args)}"
|
||||||
params['headers']['Referer'] = 'https://yep.com/'
|
params['headers']['Referer'] = 'https://yep.com/'
|
||||||
|
params['headers']['Origin'] = 'https://yep.com'
|
||||||
return params
|
return params
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -691,7 +691,7 @@ engines:
|
|||||||
shortcut: yep
|
shortcut: yep
|
||||||
categories: general
|
categories: general
|
||||||
search_type: web
|
search_type: web
|
||||||
timeout: 5
|
timeout: 15
|
||||||
disabled: true
|
disabled: true
|
||||||
|
|
||||||
- name: yep images
|
- name: yep images
|
||||||
|
|||||||
Reference in New Issue
Block a user