mirror of
https://github.com/searxng/searxng.git
synced 2024-11-19 02:40:11 +01:00
[fix] startpage: workaround to use the startpage network
workaround for the issue #762
This commit is contained in:
parent
df238e944c
commit
f9271d595f
@ -16,7 +16,7 @@ from lxml import html
|
|||||||
from babel import Locale
|
from babel import Locale
|
||||||
from babel.localedata import locale_identifiers
|
from babel.localedata import locale_identifiers
|
||||||
|
|
||||||
from searx import network
|
from searx.network import get
|
||||||
from searx.utils import extract_text, eval_xpath, match_language
|
from searx.utils import extract_text, eval_xpath, match_language
|
||||||
from searx.exceptions import (
|
from searx.exceptions import (
|
||||||
SearxEngineResponseException,
|
SearxEngineResponseException,
|
||||||
@ -84,7 +84,7 @@ def get_sc_code(headers):
|
|||||||
if time() > (sc_code_ts + 3000):
|
if time() > (sc_code_ts + 3000):
|
||||||
logger.debug("query new sc time-stamp ...")
|
logger.debug("query new sc time-stamp ...")
|
||||||
|
|
||||||
resp = network.get(base_url, headers=headers)
|
resp = get(base_url, headers=headers)
|
||||||
raise_captcha(resp)
|
raise_captcha(resp)
|
||||||
dom = html.fromstring(resp.text)
|
dom = html.fromstring(resp.text)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user