Browse Source

[mod] tineye engine: minor changes

* remove "disable: false" in settings.yml
* use the json() method from httpx.Response (faster character encoding detection)
Alexandre Flament 3 years ago
parent
commit
ebd3013a1a
2 changed files with 1 additions and 3 deletions
  1. 1 2
      searx/engines/tineye.py
  2. 0 1
      searx/settings.yml

+ 1 - 2
searx/engines/tineye.py

@@ -15,7 +15,6 @@ billion images `[tineye.com] <https://tineye.com/how>`_.
 
 """
 
-from json import loads
 from urllib.parse import urlencode
 from datetime import datetime
 
@@ -64,7 +63,7 @@ def response(resp):
     results = []
 
     # Define wanted results
-    json_data = loads(resp.text)
+    json_data = resp.json()
     number_of_results = json_data['num_matches']
 
     for i in json_data['matches']:

+ 0 - 1
searx/settings.yml

@@ -487,7 +487,6 @@ engines:
     engine: tineye
     shortcut: tin
     timeout: 9.0
-    disabled: false
 
   - name: etymonline
     engine: xpath