mirror of
https://github.com/searxng/searxng.git
synced 2025-08-03 10:32:21 +02:00
[fix] engine - bing fix search, pagination, remove safesearch
This commit is contained in:
parent
5ce1792432
commit
079636c079
4 changed files with 23 additions and 116 deletions
|
@ -6,7 +6,6 @@
|
|||
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
import uuid
|
||||
import json
|
||||
from urllib.parse import urlencode
|
||||
|
||||
|
@ -17,7 +16,6 @@ from searx.engines.bing import (
|
|||
set_bing_cookies,
|
||||
_fetch_traits,
|
||||
)
|
||||
from searx.engines.bing import send_accept_language_header # pylint: disable=unused-import
|
||||
|
||||
if TYPE_CHECKING:
|
||||
import logging
|
||||
|
@ -61,11 +59,10 @@ time_map = {
|
|||
def request(query, params):
|
||||
"""Assemble a Bing-Image request."""
|
||||
|
||||
engine_region = traits.get_region(params['searxng_locale'], 'en-US')
|
||||
engine_language = traits.get_language(params['searxng_locale'], 'en')
|
||||
engine_region = traits.get_region(params['searxng_locale'], 'en-us')
|
||||
engine_language = traits.get_language(params['searxng_locale'], 'en-us')
|
||||
|
||||
SID = uuid.uuid1().hex.upper()
|
||||
set_bing_cookies(params, engine_language, engine_region, SID)
|
||||
set_bing_cookies(params, engine_language, engine_region)
|
||||
|
||||
# build URL query
|
||||
# - example: https://www.bing.com/images/async?q=foo&first=155&count=35
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue