瀏覽代碼

[fix] use poolrequests in ddg engines

Adam Tauber 7 年之前
父節點
當前提交
077d8efed8
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1
    1
      searx/engines/duckduckgo.py
  2. 1
    1
      searx/engines/duckduckgo_images.py

+ 1
- 1
searx/engines/duckduckgo.py 查看文件

@@ -14,9 +14,9 @@
14 14
 """
15 15
 
16 16
 from lxml.html import fromstring
17
-from requests import get
18 17
 from json import loads
19 18
 from searx.engines.xpath import extract_text
19
+from searx.poolrequests import get
20 20
 from searx.url_utils import urlencode
21 21
 
22 22
 # engine dependent config

+ 1
- 1
searx/engines/duckduckgo_images.py 查看文件

@@ -13,10 +13,10 @@
13 13
  @todo        avoid extra request
14 14
 """
15 15
 
16
-from requests import get
17 16
 from json import loads
18 17
 from searx.engines.xpath import extract_text
19 18
 from searx.engines.duckduckgo import _fetch_supported_languages, supported_languages_url, get_region_code
19
+from searx.poolrequests import get
20 20
 from searx.url_utils import urlencode
21 21
 
22 22
 # engine dependent config