59 eng_region = traits.get_region(params[
'searxng_locale'], traits.all_locale)
60 eng_lang = get_ddg_lang(traits, params[
'searxng_locale'])
71 if params[
'pageno'] > 1:
72 args[
's'] = (params[
'pageno'] - 1) * 100
74 params[
'cookies'][
'ad'] = eng_lang
75 params[
'cookies'][
'ah'] = eng_region
76 params[
'cookies'][
'l'] = eng_region
78 safe_search = safesearch_cookies.get(params[
'safesearch'])
79 if safe_search
is not None:
80 params[
'cookies'][
'p'] = safe_search
81 safe_search = safesearch_args.get(params[
'safesearch'])
82 if safe_search
is not None:
83 args[
'p'] = safe_search
85 logger.debug(
"cookies: %s", params[
'cookies'])
87 params[
'url'] = f
'https://duckduckgo.com/{search_path_map[ddg_category]}.js?{urlencode(args)}'