forked from zaclys/searxng
Merge pull request #2293 from return42/fix-1454
[fix] engine gigablast: add &userid=<User ID>&code=<Feed Code>
This commit is contained in:
commit
767f22eca1
|
@ -39,6 +39,9 @@ extra_param_ts = 0
|
|||
# after how many seconds extra_param expire
|
||||
extra_param_expiration_delay = 3000
|
||||
|
||||
gb_userid = ''
|
||||
gb_code = ''
|
||||
|
||||
|
||||
def fetch_extra_param(query_args, headers):
|
||||
|
||||
|
@ -71,6 +74,10 @@ def fetch_extra_param(query_args, headers):
|
|||
def request(query, params): # pylint: disable=unused-argument
|
||||
query_args = dict(c='main', q=query, dr=1, showgoodimages=0)
|
||||
|
||||
if gb_userid and gb_code:
|
||||
query_args['userid'] = gb_userid
|
||||
query_args['code'] = gb_code
|
||||
|
||||
if params['language'] and params['language'] != 'all':
|
||||
query_args['qlangcountry'] = params['language']
|
||||
query_args['qlang'] = params['language'].split('-')[0]
|
||||
|
|
|
@ -674,6 +674,9 @@ engines:
|
|||
engine: gigablast
|
||||
shortcut: gb
|
||||
timeout: 4.0
|
||||
# API key required, see https://gigablast.com/searchfeed.html
|
||||
# gb_userid: unset
|
||||
# gb_code: unknown
|
||||
disabled: true
|
||||
additional_tests:
|
||||
rosebud: *test_rosebud
|
||||
|
|
Loading…
Reference in New Issue