on master help sign in
Merge pull request #301 from dalf/https

engines: use https when possible

commitad8611c7558b9de778f4d9bb304d053f2fc99020 authorAdam Tauber <asciimoo@gmail.com> dateSun 26 Apr 2015, 13:37 (12 years ago) parent18e7d60043b269
8 files changed+9−9
searx/engines/bing_images.py+1−1 searx/engines/currency_convert.py+2−2 searx/engines/mixcloud.py+1−1 searx/engines/stackoverflow.py+1−1 searx/engines/vimeo.py+1−1 searx/tests/engines/test_currency_convert.py+1−1 searx/tests/engines/test_stackoverflow.py+1−1 searx/tests/engines/test_vimeo.py+1−1
searx/engines/bing_images.py+1−1
@@ -26,7 +26,7 @@ safesearch = True
2626# search-url
2727base_url = 'https://www.bing.com/'
2828search_string = 'images/search?{query}&count=10&first={offset}'
29−thumb_url = "http://ts1.mm.bing.net/th?id={ihk}"
29+thumb_url = "http://ts1.mm.bing.net/th?id={ihk}" # no https, bad certificate
3030
3131# safesearch definitions
3232safesearch_types = {2: 'STRICT',
searx/engines/currency_convert.py+2−2
@@ -2,7 +2,7 @@ from datetime import datetime
22import re
33
44categories = []
5−url = 'http://finance.yahoo.com/d/quotes.csv?e=.csv&f=sl1d1t1&s={query}=X'
5+url = 'https://download.finance.yahoo.com/d/quotes.csv?e=.csv&f=sl1d1t1&s={query}=X'
66weight = 100
77
88parser_re = re.compile(r'^\W*(\d+(?:\.\d+)?)\W*([a-z]{3})\W*(?:in)?\W*([a-z]{3})\W*$', re.I) # noqa
@@ -44,7 +44,7 @@ def response(resp):
4444 )
4545
4646 now_date = datetime.now().strftime('%Y%m%d')
47− url = 'http://finance.yahoo.com/currency/converter-results/{0}/{1}-{2}-to-{3}.html' # noqa
47+ url = 'https://finance.yahoo.com/currency/converter-results/{0}/{1}-{2}-to-{3}.html' # noqa
4848 url = url.format(
4949 now_date,
5050 resp.search_params['ammount'],
searx/engines/mixcloud.py+1−1
@@ -17,7 +17,7 @@ categories = ['music']
1717paging = True
1818
1919# search-url
20−url = 'http://api.mixcloud.com/'
20+url = 'https://api.mixcloud.com/'
2121search_url = url + 'search/?{query}&type=cloudcast&limit=10&offset={offset}'
2222
2323embedded_url = '<iframe scrolling="no" frameborder="0" allowTransparency="true" ' +\
searx/engines/stackoverflow.py+1−1
@@ -19,7 +19,7 @@ categories = ['it']
1919paging = True
2020
2121# search-url
22−url = 'http://stackoverflow.com/'
22+url = 'https://stackoverflow.com/'
2323search_url = url+'search?{query}&page={pageno}'
2424
2525# specific xpath variables
searx/engines/vimeo.py+1−1
@@ -23,7 +23,7 @@ categories = ['videos']
2323paging = True
2424
2525# search-url
26−base_url = 'http://vimeo.com'
26+base_url = 'https://vimeo.com'
2727search_url = base_url + '/search/page:{pageno}?{query}'
2828
2929# specific xpath variables
searx/tests/engines/test_currency_convert.py+1−1
@@ -40,5 +40,5 @@ class TestCurrencyConvertEngine(SearxTestCase):
4040 self.assertEqual(len(results), 1)
4141 self.assertEqual(results[0]['answer'], '10 EUR = 5.0 USD (1 EUR = 0.5 USD)')
4242 now_date = datetime.now().strftime('%Y%m%d')
43− self.assertEqual(results[0]['url'], 'http://finance.yahoo.com/currency/converter-results/' +
43+ self.assertEqual(results[0]['url'], 'https://finance.yahoo.com/currency/converter-results/' +
4444 now_date + '/10-eur-to-usd.html')
searx/tests/engines/test_stackoverflow.py+1−1
@@ -64,7 +64,7 @@ class TestStackoverflowEngine(SearxTestCase):
6464 self.assertEqual(type(results), list)
6565 self.assertEqual(len(results), 1)
6666 self.assertEqual(results[0]['title'], 'This is the title')
67− self.assertEqual(results[0]['url'], 'http://stackoverflow.com/questions/this.is.the.url')
67+ self.assertEqual(results[0]['url'], 'https://stackoverflow.com/questions/this.is.the.url')
6868 self.assertEqual(results[0]['content'], 'This is the content')
6969
7070 html = """
searx/tests/engines/test_vimeo.py+1−1
@@ -52,7 +52,7 @@ class TestVimeoEngine(SearxTestCase):
5252 self.assertEqual(type(results), list)
5353 self.assertEqual(len(results), 1)
5454 self.assertEqual(results[0]['title'], 'This is the title')
55− self.assertEqual(results[0]['url'], 'http://vimeo.com/videoid')
55+ self.assertEqual(results[0]['url'], 'https://vimeo.com/videoid')
5656 self.assertEqual(results[0]['content'], '')
5757 self.assertEqual(results[0]['thumbnail'], 'http://image.url.webp')
5858 self.assertIn('/videoid', results[0]['embedded'])