logo

searx

My custom branche(s) on searx, a meta-search engine
commit: 96dfb86947d11a4e85f9f34704c8fa503290c8b0
parent: 4e28f12bfcc73b47f382bceedb5b65ee314674ae
Author: Adam Tauber <asciimoo@gmail.com>
Date:   Mon,  8 Jun 2015 08:12:01 -0400

Merge pull request #361 from asciimoo/https

bing_images & www1x engines use https connections

Diffstat:

Msearx/engines/bing_images.py2+-
Msearx/engines/www1x.py4++--
Msearx/tests/engines/test_bing_images.py2+-
Msearx/tests/engines/test_www1x.py4++--
4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/searx/engines/bing_images.py b/searx/engines/bing_images.py @@ -28,7 +28,7 @@ safesearch = True # search-url base_url = 'https://www.bing.com/' search_string = 'images/search?{query}&count=10&first={offset}' -thumb_url = "http://ts1.mm.bing.net/th?id={ihk}" # no https, bad certificate +thumb_url = "https://www.bing.com/th?id={ihk}" # safesearch definitions safesearch_types = {2: 'STRICT', diff --git a/searx/engines/www1x.py b/searx/engines/www1x.py @@ -20,8 +20,8 @@ import re categories = ['images'] paging = False -# search-url, no HTTPS (there is a valid certificate for https://api2.1x.com/ ) -base_url = 'http://1x.com' +# search-url +base_url = 'https://1x.com' search_url = base_url+'/backend/search.php?{query}' diff --git a/searx/tests/engines/test_bing_images.py b/searx/tests/engines/test_bing_images.py @@ -59,7 +59,7 @@ oh:&quot;238&quot;,tft:&quot;0&quot;,oi:&quot;http://www.image.url/Images/Test%2 self.assertEqual(results[0]['title'], 'Test Query') self.assertEqual(results[0]['url'], 'http://www.page.url/') self.assertEqual(results[0]['content'], '') - self.assertEqual(results[0]['thumbnail_src'], 'http://ts1.mm.bing.net/th?id=HN.608003696942779811') + self.assertEqual(results[0]['thumbnail_src'], 'https://www.bing.com/th?id=HN.608003696942779811') self.assertEqual(results[0]['img_src'], 'http://test.url/Test%20Query.jpg') html = """ diff --git a/searx/tests/engines/test_www1x.py b/searx/tests/engines/test_www1x.py @@ -51,7 +51,7 @@ class TestWww1xEngine(SearxTestCase): results = www1x.response(response) self.assertEqual(type(results), list) self.assertEqual(len(results), 1) - self.assertEqual(results[0]['url'], 'http://1x.com/photo/123456') - self.assertEqual(results[0]['thumbnail_src'], 'http://1x.com/images/user/testimage-123456.jpg') + self.assertEqual(results[0]['url'], 'https://1x.com/photo/123456') + self.assertEqual(results[0]['thumbnail_src'], 'https://1x.com/images/user/testimage-123456.jpg') self.assertEqual(results[0]['content'], '') self.assertEqual(results[0]['template'], 'images.html')