mirror of https://github.com/searxng/searxng.git
bing_images & www1x engines use https connections
This commit is contained in:
parent
4e28f12bfc
commit
9e147d91f0
|
@ -28,7 +28,7 @@ safesearch = True
|
||||||
# search-url
|
# search-url
|
||||||
base_url = 'https://www.bing.com/'
|
base_url = 'https://www.bing.com/'
|
||||||
search_string = 'images/search?{query}&count=10&first={offset}'
|
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 definitions
|
||||||
safesearch_types = {2: 'STRICT',
|
safesearch_types = {2: 'STRICT',
|
||||||
|
|
|
@ -21,7 +21,7 @@ categories = ['images']
|
||||||
paging = False
|
paging = False
|
||||||
|
|
||||||
# search-url, no HTTPS (there is a valid certificate for https://api2.1x.com/ )
|
# search-url, no HTTPS (there is a valid certificate for https://api2.1x.com/ )
|
||||||
base_url = 'http://1x.com'
|
base_url = 'https://1x.com'
|
||||||
search_url = base_url+'/backend/search.php?{query}'
|
search_url = base_url+'/backend/search.php?{query}'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ oh:"238",tft:"0",oi:"http://www.image.url/Images/Test%2
|
||||||
self.assertEqual(results[0]['title'], 'Test Query')
|
self.assertEqual(results[0]['title'], 'Test Query')
|
||||||
self.assertEqual(results[0]['url'], 'http://www.page.url/')
|
self.assertEqual(results[0]['url'], 'http://www.page.url/')
|
||||||
self.assertEqual(results[0]['content'], '')
|
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')
|
self.assertEqual(results[0]['img_src'], 'http://test.url/Test%20Query.jpg')
|
||||||
|
|
||||||
html = """
|
html = """
|
||||||
|
|
|
@ -51,7 +51,7 @@ class TestWww1xEngine(SearxTestCase):
|
||||||
results = www1x.response(response)
|
results = www1x.response(response)
|
||||||
self.assertEqual(type(results), list)
|
self.assertEqual(type(results), list)
|
||||||
self.assertEqual(len(results), 1)
|
self.assertEqual(len(results), 1)
|
||||||
self.assertEqual(results[0]['url'], 'http://1x.com/photo/123456')
|
self.assertEqual(results[0]['url'], 'https://1x.com/photo/123456')
|
||||||
self.assertEqual(results[0]['thumbnail_src'], 'http://1x.com/images/user/testimage-123456.jpg')
|
self.assertEqual(results[0]['thumbnail_src'], 'https://1x.com/images/user/testimage-123456.jpg')
|
||||||
self.assertEqual(results[0]['content'], '')
|
self.assertEqual(results[0]['content'], '')
|
||||||
self.assertEqual(results[0]['template'], 'images.html')
|
self.assertEqual(results[0]['template'], 'images.html')
|
||||||
|
|
Loading…
Reference in New Issue