summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--searx/__init__.py10
-rw-r--r--searx/engines/__init__.py20
-rw-r--r--searx/engines/currency_convert.py11
-rw-r--r--searx/engines/duckduckgo_definitions.py128
-rw-r--r--searx/engines/wikidata.py238
-rw-r--r--searx/engines/youtube.py2
-rw-r--r--searx/https_rewrite.py143
-rw-r--r--searx/https_rules/00README17
-rw-r--r--searx/https_rules/Bing.xml56
-rw-r--r--searx/https_rules/Dailymotion.xml69
-rw-r--r--searx/https_rules/Deviantart.xml53
-rw-r--r--searx/https_rules/DuckDuckGo.xml38
-rw-r--r--searx/https_rules/Flickr.xml44
-rw-r--r--searx/https_rules/Github-Pages.xml11
-rw-r--r--searx/https_rules/Github.xml94
-rw-r--r--searx/https_rules/Google-mismatches.xml26
-rw-r--r--searx/https_rules/Google.org.xml14
-rw-r--r--searx/https_rules/GoogleAPIs.xml143
-rw-r--r--searx/https_rules/GoogleCanada.xml6
-rw-r--r--searx/https_rules/GoogleImages.xml65
-rw-r--r--searx/https_rules/GoogleMainSearch.xml78
-rw-r--r--searx/https_rules/GoogleMaps.xml67
-rw-r--r--searx/https_rules/GoogleMelange.xml6
-rw-r--r--searx/https_rules/GoogleSearch.xml135
-rw-r--r--searx/https_rules/GoogleServices.xml345
-rw-r--r--searx/https_rules/GoogleShopping.xml28
-rw-r--r--searx/https_rules/GoogleSorry.xml7
-rw-r--r--searx/https_rules/GoogleTranslate.xml8
-rw-r--r--searx/https_rules/GoogleVideos.xml83
-rw-r--r--searx/https_rules/GoogleWatchBlog.xml17
-rw-r--r--searx/https_rules/Google_App_Engine.xml21
-rw-r--r--searx/https_rules/Googleplex.com.xml16
-rw-r--r--searx/https_rules/OpenStreetMap.xml15
-rw-r--r--searx/https_rules/Rawgithub.com.xml14
-rw-r--r--searx/https_rules/Soundcloud.xml101
-rw-r--r--searx/https_rules/ThePirateBay.xml36
-rw-r--r--searx/https_rules/Torproject.xml18
-rw-r--r--searx/https_rules/Twitter.xml169
-rw-r--r--searx/https_rules/Vimeo.xml75
-rw-r--r--searx/https_rules/WikiLeaks.xml13
-rw-r--r--searx/https_rules/Wikimedia.xml107
-rw-r--r--searx/https_rules/Yahoo.xml2450
-rw-r--r--searx/https_rules/YouTube.xml46
-rw-r--r--searx/query.py127
-rw-r--r--searx/search.py184
-rw-r--r--searx/settings.yml5
-rw-r--r--searx/settings_robot.yml3
-rw-r--r--searx/static/default/css/style.css20
-rw-r--r--searx/static/default/less/style.less133
-rw-r--r--searx/templates/default/infobox.html44
-rw-r--r--searx/templates/default/result_templates/default.html2
-rw-r--r--searx/templates/default/results.html16
-rw-r--r--searx/tests/test_webapp.py10
-rw-r--r--searx/translations/de/LC_MESSAGES/messages.mobin2387 -> 2549 bytes
-rw-r--r--searx/translations/de/LC_MESSAGES/messages.po148
-rw-r--r--searx/translations/en/LC_MESSAGES/messages.mobin2278 -> 2492 bytes
-rw-r--r--searx/translations/en/LC_MESSAGES/messages.po122
-rw-r--r--searx/translations/es/LC_MESSAGES/messages.mobin2458 -> 2600 bytes
-rw-r--r--searx/translations/es/LC_MESSAGES/messages.po149
-rw-r--r--searx/translations/fr/LC_MESSAGES/messages.mobin2473 -> 2613 bytes
-rw-r--r--searx/translations/fr/LC_MESSAGES/messages.po149
-rw-r--r--searx/translations/hu/LC_MESSAGES/messages.mobin2338 -> 2545 bytes
-rw-r--r--searx/translations/hu/LC_MESSAGES/messages.po138
-rw-r--r--searx/translations/it/LC_MESSAGES/messages.mobin2439 -> 2566 bytes
-rw-r--r--searx/translations/it/LC_MESSAGES/messages.po145
-rw-r--r--searx/translations/ja/LC_MESSAGES/messages.mobin0 -> 2477 bytes
-rw-r--r--searx/translations/ja/LC_MESSAGES/messages.po215
-rw-r--r--searx/translations/nl/LC_MESSAGES/messages.mobin2396 -> 2520 bytes
-rw-r--r--searx/translations/nl/LC_MESSAGES/messages.po143
-rw-r--r--searx/webapp.py95
70 files changed, 6389 insertions, 502 deletions
diff --git a/searx/__init__.py b/searx/__init__.py
index 17da2f353..c4c363bf8 100644
--- a/searx/__init__.py
+++ b/searx/__init__.py
@@ -17,6 +17,7 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.
from os import environ
from os.path import realpath, dirname, join, abspath
+from searx.https_rewrite import load_https_rules
try:
from yaml import load
except:
@@ -34,7 +35,16 @@ if 'SEARX_SETTINGS_PATH' in environ:
else:
settings_path = join(searx_dir, 'settings.yml')
+if 'SEARX_HTTPS_REWRITE_PATH' in environ:
+ https_rewrite_path = environ['SEARX_HTTPS_REWRITE_PATH']
+else:
+ https_rewrite_path = join(searx_dir, 'https_rules')
# load settings
with open(settings_path) as settings_yaml:
settings = load(settings_yaml)
+
+# load https rules only if https rewrite is enabled
+if settings.get('server', {}).get('https_rewrite'):
+ # loade https rules
+ load_https_rules(https_rewrite_path)
diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py
index 82c9407a2..e63dd7189 100644
--- a/searx/engines/__init__.py
+++ b/searx/engines/__init__.py
@@ -142,16 +142,28 @@ def get_engines_stats():
})
for engine in pageloads:
- engine['percentage'] = int(engine['avg'] / max_pageload * 100)
+ if max_pageload:
+ engine['percentage'] = int(engine['avg'] / max_pageload * 100)
+ else:
+ engine['percentage'] = 0
for engine in results:
- engine['percentage'] = int(engine['avg'] / max_results * 100)
+ if max_results:
+ engine['percentage'] = int(engine['avg'] / max_results * 100)
+ else:
+ engine['percentage'] = 0
for engine in scores:
- engine['percentage'] = int(engine['avg'] / max_score * 100)
+ if max_score:
+ engine['percentage'] = int(engine['avg'] / max_score * 100)
+ else:
+ engine['percentage'] = 0
for engine in scores_per_result:
- engine['percentage'] = int(engine['avg'] / max_score_per_result * 100)
+ if max_score_per_result:
+ engine['percentage'] = int(engine['avg'] / max_score_per_result * 100)
+ else:
+ engine['percentage'] = 0
for engine in errors:
if max_errors:
diff --git a/searx/engines/currency_convert.py b/searx/engines/currency_convert.py
index 561527bce..b5f0953d8 100644
--- a/searx/engines/currency_convert.py
+++ b/searx/engines/currency_convert.py
@@ -38,16 +38,14 @@ def response(resp):
except:
return results
- title = '{0} {1} in {2} is {3}'.format(
+ answer = '{0} {1} = {2} {3} (1 {1} = {4} {3})'.format(
resp.search_params['ammount'],
resp.search_params['from'],
+ resp.search_params['ammount'] * conversion_rate,
resp.search_params['to'],
- resp.search_params['ammount'] * conversion_rate
+ conversion_rate
)
- content = '1 {0} is {1} {2}'.format(resp.search_params['from'],
- conversion_rate,
- resp.search_params['to'])
now_date = datetime.now().strftime('%Y%m%d')
url = 'http://finance.yahoo.com/currency/converter-results/{0}/{1}-{2}-to-{3}.html' # noqa
url = url.format(
@@ -56,6 +54,7 @@ def response(resp):
resp.search_params['from'].lower(),
resp.search_params['to'].lower()
)
- results.append({'title': title, 'content': content, 'url': url})
+
+ results.append({'answer' : answer, 'url': url})
return results
diff --git a/searx/engines/duckduckgo_definitions.py b/searx/engines/duckduckgo_definitions.py
index 3037aae53..c008f22f7 100644
--- a/searx/engines/duckduckgo_definitions.py
+++ b/searx/engines/duckduckgo_definitions.py
@@ -1,10 +1,25 @@
import json
from urllib import urlencode
+from lxml import html
+from searx.engines.xpath import extract_text
-url = 'http://api.duckduckgo.com/?{query}&format=json&pretty=0&no_redirect=1'
+url = 'https://api.duckduckgo.com/?{query}&format=json&pretty=0&no_redirect=1&d=1'
+def result_to_text(url, text, htmlResult):
+ # TODO : remove result ending with "Meaning" or "Category"
+ dom = html.fromstring(htmlResult)
+ a = dom.xpath('//a')
+ if len(a)>=1:
+ return extract_text(a[0])
+ else:
+ return text
+
+def html_to_text(htmlFragment):
+ dom = html.fromstring(htmlFragment)
+ return extract_text(dom)
def request(query, params):
+ # TODO add kl={locale}
params['url'] = url.format(query=urlencode({'q': query}))
return params
@@ -12,12 +27,111 @@ def request(query, params):
def response(resp):
search_res = json.loads(resp.text)
results = []
+
+ content = ''
+ heading = search_res.get('Heading', '')
+ attributes = []
+ urls = []
+ infobox_id = None
+ relatedTopics = []
+
+ # add answer if there is one
+ answer = search_res.get('Answer', '')
+ if answer != '':
+ results.append({ 'answer' : html_to_text(answer) })
+
+ # add infobox
if 'Definition' in search_res:
- if search_res.get('AbstractURL'):
- res = {'title': search_res.get('Heading', ''),
- 'content': search_res.get('Definition', ''),
- 'url': search_res.get('AbstractURL', ''),
- 'class': 'definition_result'}
- results.append(res)
+ content = content + search_res.get('Definition', '')
+
+ if 'Abstract' in search_res:
+ content = content + search_res.get('Abstract', '')
+
+
+ # image
+ image = search_res.get('Image', '')
+ image = None if image == '' else image
+
+ # attributes
+ if 'Infobox' in search_res:
+ infobox = search_res.get('Infobox', None)
+ if 'content' in infobox:
+ for info in infobox.get('content'):
+ attributes.append({'label': info.get('label'), 'value': info.get('value')})
+
+ # urls
+ for ddg_result in search_res.get('Results', []):
+ if 'FirstURL' in ddg_result:
+ firstURL = ddg_result.get('FirstURL', '')
+ text = ddg_result.get('Text', '')
+ urls.append({'title':text, 'url':firstURL})
+ results.append({'title':heading, 'url': firstURL})
+
+ # related topics
+ for ddg_result in search_res.get('RelatedTopics', None):
+ if 'FirstURL' in ddg_result:
+ suggestion = result_to_text(ddg_result.get('FirstURL', None), ddg_result.get('Text', None), ddg_result.get('Result', None))
+ if suggestion != heading:
+ results.append({'suggestion': suggestion})
+ elif 'Topics' in ddg_result:
+ suggestions = []
+ relatedTopics.append({ 'name' : ddg_result.get('Name', ''), 'suggestions': suggestions })
+ for topic_result in ddg_result.get('Topics', []):
+ suggestion = result_to_text(topic_result.get('FirstURL', None), topic_result.get('Text', None), topic_result.get('Result', None))
+ if suggestion != heading:
+ suggestions.append(suggestion)
+
+ # abstract
+ abstractURL = search_res.get('AbstractURL', '')
+ if abstractURL != '':
+ # add as result ? problem always in english
+ infobox_id = abstractURL
+ urls.append({'title': search_res.get('AbstractSource'), 'url': abstractURL})
+
+ # definition
+ definitionURL = search_res.get('DefinitionURL', '')
+ if definitionURL != '':
+ # add as result ? as answer ? problem always in english
+ infobox_id = definitionURL
+ urls.append({'title': search_res.get('DefinitionSource'), 'url': definitionURL})
+
+ # entity
+ entity = search_res.get('Entity', None)
+ # TODO continent / country / department / location / waterfall / mountain range : link to map search, get weather, near by locations
+ # TODO musician : link to music search
+ # TODO concert tour : ??
+ # TODO film / actor / television / media franchise : links to IMDB / rottentomatoes (or scrap result)
+ # TODO music : link tu musicbrainz / last.fm
+ # TODO book : ??
+ # TODO artist / playwright : ??
+ # TODO compagny : ??
+ # TODO software / os : ??
+ # TODO software engineer : ??
+ # TODO prepared food : ??
+ # TODO website : ??
+ # TODO performing art : ??
+ # TODO prepared food : ??
+ # TODO programming language : ??
+ # TODO file format : ??
+
+ if len(heading)>0:
+ # TODO get infobox.meta.value where .label='article_title'
+ if image==None and len(attributes)==0 and len(urls)==1 and len(relatedTopics)==0 and len(content)==0:
+ results.append({
+ 'url': urls[0]['url'],
+ 'title': heading,
+ 'content': content
+ })
+ else:
+ results.append({
+ 'infobox': heading,
+ 'id': infobox_id,
+ 'entity': entity,
+ 'content': content,
+ 'img_src' : image,
+ 'attributes': attributes,
+ 'urls': urls,
+ 'relatedTopics': relatedTopics
+ })
return results
diff --git a/searx/engines/wikidata.py b/searx/engines/wikidata.py
new file mode 100644
index 000000000..7877e1198
--- /dev/null
+++ b/searx/engines/wikidata.py
@@ -0,0 +1,238 @@
+import json
+from requests import get
+from urllib import urlencode
+
+resultCount=1
+urlSearch = 'https://www.wikidata.org/w/api.php?action=query&list=search&format=json&srnamespace=0&srprop=sectiontitle&{query}'
+urlDetail = 'https://www.wikidata.org/w/api.php?action=wbgetentities&format=json&props=labels%7Cinfo%7Csitelinks%7Csitelinks%2Furls%7Cdescriptions%7Cclaims&{query}'
+urlMap = 'https://www.openstreetmap.org/?lat={latitude}&lon={longitude}&zoom={zoom}&layers=M'
+
+def request(query, params):
+ params['url'] = urlSearch.format(query=urlencode({'srsearch': query, 'srlimit': resultCount}))
+ return params
+
+
+def response(resp):
+ results = []
+ search_res = json.loads(resp.text)
+
+ wikidata_ids = set()
+ for r in search_res.get('query', {}).get('search', {}):
+ wikidata_ids.add(r.get('title', ''))
+
+ language = resp.search_params['language'].split('_')[0]
+ if language == 'all':
+ language = 'en'
+ url = urlDetail.format(query=urlencode({'ids': '|'.join(wikidata_ids), 'languages': language + '|en'}))
+
+ htmlresponse = get(url)
+ jsonresponse = json.loads(htmlresponse.content)
+ for wikidata_id in wikidata_ids:
+ results = results + getDetail(jsonresponse, wikidata_id, language)
+
+ return results
+
+def getDetail(jsonresponse, wikidata_id, language):
+ results = []
+ urls = []
+ attributes = []
+
+ result = jsonresponse.get('entities', {}).get(wikidata_id, {})
+
+ title = result.get('labels', {}).get(language, {}).get('value', None)
+ if title == None:
+ title = result.get('labels', {}).get('en', {}).get('value', None)
+ if title == None:
+ return results
+
+ description = result.get('descriptions', {}).get(language, {}).get('value', None)
+ if description == None:
+ description = result.get('descriptions', {}).get('en', {}).get('value', '')
+
+ claims = result.get('claims', {})
+ official_website = get_string(claims, 'P856', None)
+ if official_website != None:
+ urls.append({ 'title' : 'Official site', 'url': official_website })
+ results.append({ 'title': title, 'url' : official_website })
+
+ wikipedia_link_count = 0
+ if language != 'en':
+ wikipedia_link_count += add_url(urls, 'Wikipedia (' + language + ')', get_wikilink(result, language + 'wiki'))
+ wikipedia_en_link = get_wikilink(result, 'enwiki')
+ wikipedia_link_count += add_url(urls, 'Wikipedia (en)', wikipedia_en_link)
+ if wikipedia_link_count == 0:
+ misc_language = get_wiki_firstlanguage(result, 'wiki')
+ if misc_language != None:
+ add_url(urls, 'Wikipedia (' + misc_language + ')', get_wikilink(result, misc_language + 'wiki'))
+
+ if language != 'en':
+ add_url(urls, 'Wiki voyage (' + language + ')', get_wikilink(result, language + 'wikivoyage'))
+ add_url(urls, 'Wiki voyage (en)', get_wikilink(result, 'enwikivoyage'))
+
+ if language != 'en':
+ add_url(urls, 'Wikiquote (' + language + ')', get_wikilink(result, language + 'wikiquote'))
+ add_url(urls, 'Wikiquote (en)', get_wikilink(result, 'enwikiquote'))
+
+ add_url(urls, 'Commons wiki', get_wikilink(result, 'commonswiki'))
+
+ add_url(urls, 'Location', get_geolink(claims, 'P625', None))
+
+ add_url(urls, 'Wikidata', 'https://www.wikidata.org/wiki/' + wikidata_id + '?uselang='+ language)
+
+ musicbrainz_work_id = get_string(claims, 'P435')
+ if musicbrainz_work_id != None:
+ add_url(urls, 'MusicBrainz', 'http://musicbrainz.org/work/' + musicbrainz_work_id)
+
+ musicbrainz_artist_id = get_string(claims, 'P434')
+ if musicbrainz_artist_id != None:
+ add_url(urls, 'MusicBrainz', 'http://musicbrainz.org/artist/' + musicbrainz_artist_id)
+
+ musicbrainz_release_group_id = get_string(claims, 'P436')
+ if musicbrainz_release_group_id != None:
+ add_url(urls, 'MusicBrainz', 'http://musicbrainz.org/release-group/' + musicbrainz_release_group_id)
+
+ musicbrainz_label_id = get_string(claims, 'P966')
+ if musicbrainz_label_id != None:
+ add_url(urls, 'MusicBrainz', 'http://musicbrainz.org/label/' + musicbrainz_label_id)
+
+ # musicbrainz_area_id = get_string(claims, 'P982')
+ # P1407 MusicBrainz series ID
+ # P1004 MusicBrainz place ID
+ # P1330 MusicBrainz instrument ID
+ # P1407 MusicBrainz series ID
+
+ postal_code = get_string(claims, 'P281', None)
+ if postal_code != None:
+ attributes.append({'label' : 'Postal code(s)', 'value' : postal_code})
+
+ date_of_birth = get_time(claims, 'P569', None)
+ if date_of_birth != None:
+ attributes.append({'label' : 'Date of birth', 'value' : date_of_birth})
+
+ date_of_death = get_time(claims, 'P570', None)
+ if date_of_death != None:
+ attributes.append({'label' : 'Date of death', 'value' : date_of_death})
+
+ if len(attributes)==0 and len(urls)==2 and len(description)==0:
+ results.append({
+ 'url': urls[0]['url'],
+ 'title': title,
+ 'content': description
+ })
+ else:
+ results.append({
+ 'infobox' : title,
+ 'id' : wikipedia_en_link,
+ 'content' : description,
+ 'attributes' : attributes,
+ 'urls' : urls
+ })
+
+ return results
+
+
+def add_url(urls, title, url):
+ if url != None:
+ urls.append({'title' : title, 'url' : url})
+ return 1
+ else:
+ return 0
+
+def get_mainsnak(claims, propertyName):
+ propValue = claims.get(propertyName, {})
+ if len(propValue) == 0:
+ return None
+
+ propValue = propValue[0].get('mainsnak', None)
+ return propValue
+
+
+def get_string(claims, propertyName, defaultValue=None):
+ propValue = claims.get(propertyName, {})
+ if len(propValue) == 0:
+ return defaultValue
+
+ result = []
+ for e in propValue:
+ mainsnak = e.get('mainsnak', {})
+
+ datavalue = mainsnak.get('datavalue', {})
+ if datavalue != None:
+ result.append(datavalue.get('value', ''))
+
+ if len(result) == 0:
+ return defaultValue
+ else:
+ #TODO handle multiple urls
+ return result[0]
+
+
+def get_time(claims, propertyName, defaultValue=None):
+ propValue = claims.get(propertyName, {})
+ if len(propValue) == 0:
+ return defaultValue
+
+ result = []
+ for e in propValue:
+ mainsnak = e.get('mainsnak', {})
+
+ datavalue = mainsnak.get('datavalue', {})
+ if datavalue != None:
+ value = datavalue.get('value', '')
+ result.append(value.get('time', ''))
+
+ if len(result) == 0:
+ return defaultValue
+ else:
+ return ', '.join(result)
+
+
+def get_geolink(claims, propertyName, defaultValue=''):
+ mainsnak = get_mainsnak(claims, propertyName)
+
+ if mainsnak == None:
+ return defaultValue
+
+ datatype = mainsnak.get('datatype', '')
+ datavalue = mainsnak.get('datavalue', {})
+
+ if datatype != 'globe-coordinate':
+ return defaultValue
+
+ value = datavalue.get('value', {})
+
+ precision = value.get('precision', 0.0002)
+
+ # there is no zoom information, deduce from precision (error prone)
+ # samples :
+ # 13 --> 5
+ # 1 --> 6
+ # 0.016666666666667 --> 9
+ # 0.00027777777777778 --> 19
+ # wolframalpha : quadratic fit { {13, 5}, {1, 6}, {0.0166666, 9}, {0.0002777777,19}}
+ # 14.1186-8.8322 x+0.625447 x^2
+ if precision < 0.0003:
+ zoom = 19
+ else:
+ zoom = int(15 - precision*8.8322 + precision*precision*0.625447)
+
+ url = urlMap.replace('{latitude}', str(value.get('latitude',0))).replace('{longitude}', str(value.get('longitude',0))).replace('{zoom}', str(zoom))
+
+ return url
+
+
+def get_wikilink(result, wikiid):
+ url = result.get('sitelinks', {}).get(wikiid, {}).get('url', None)
+ if url == None:
+ return url
+ elif url.startswith('http://'):
+ url = url.replace('http://', 'https://')
+ elif url.startswith('//'):
+ url = 'https:' + url
+ return url
+
+def get_wiki_firstlanguage(result, wikipatternid):
+ for k in result.get('sitelinks', {}).keys():
+ if k.endswith(wikipatternid) and len(k)==(2+len(wikipatternid)):
+ return k[0:2]
+ return None
diff --git a/searx/engines/youtube.py b/searx/engines/youtube.py
index a3c3980af..794028845 100644
--- a/searx/engines/youtube.py
+++ b/searx/engines/youtube.py
@@ -13,7 +13,7 @@ from urllib import urlencode
from dateutil import parser
# engine dependent config
-categories = ['videos']
+categories = ['videos', 'music']
paging = True
language_support = True
diff --git a/searx/https_rewrite.py b/searx/https_rewrite.py
index 44ada9450..18405d87a 100644
--- a/searx/https_rewrite.py
+++ b/searx/https_rewrite.py
@@ -1,14 +1,141 @@
+'''
+searx is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+searx is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with searx. If not, see < http://www.gnu.org/licenses/ >.
+
+(C) 2013- by Adam Tauber, <asciimoo@gmail.com>
+'''
+
import re
+from lxml import etree
+from os import listdir
+from os.path import isfile, join
+
# https://gitweb.torproject.org/\
# pde/https-everywhere.git/tree/4.0:/src/chrome/content/rules
# HTTPS rewrite rules
-https_rules = (
- # from
- (re.compile(r'^http://(www\.|m\.|)?xkcd\.(?:com|org)/', re.I | re.U),
- # to
- r'https://\1xkcd.com/'),
- (re.compile(r'^https?://(?:ssl)?imgs\.xkcd\.com/', re.I | re.U),
- r'https://sslimgs.xkcd.com/'),
-)
+https_rules = []
+
+
+# load single ruleset from a xml file
+def load_single_https_ruleset(filepath):
+ ruleset = ()
+
+ # init parser
+ parser = etree.XMLParser()
+
+ # load and parse xml-file
+ try:
+ tree = etree.parse(filepath, parser)
+ except:
+ # TODO, error message
+ return ()
+
+ # get root node
+ root = tree.getroot()
+
+ #print(etree.tostring(tree))
+
+ # check if root is a node with the name ruleset
+ # TODO improve parsing
+ if root.tag != 'ruleset':
+ return ()
+
+ # check if rule is deactivated by default
+ if root.attrib.get('default_off'):
+ return ()
+
+ # check if rule does only work for specific platforms
+ if root.attrib.get('platform'):
+ return ()
+
+ hosts = []
+ rules = []
+ exclusions = []
+
+ # parse childs from ruleset
+ for ruleset in root:
+ # this child define a target
+ if ruleset.tag == 'target':
+ # check if required tags available
+ if not ruleset.attrib.get('host'):
+ continue
+
+ # convert host-rule to valid regex
+ host = ruleset.attrib.get('host').replace('.', '\.').replace('*', '.*')
+
+ # append to host list
+ hosts.append(host)
+
+ # this child define a rule
+ elif ruleset.tag == 'rule':
+ # check if required tags available
+ if not ruleset.attrib.get('from')\
+ or not ruleset.attrib.get('to'):
+ continue
+
+ # TODO hack, which convert a javascript regex group into a valid python regex group
+ rule_from = ruleset.attrib.get('from').replace('$', '\\')
+ rule_to = ruleset.attrib.get('to').replace('$', '\\')
+
+ # TODO, not working yet because of the hack above, currently doing that in webapp.py
+ #rule_from_rgx = re.compile(rule_from, re.I)
+
+ # append rule
+ rules.append((rule_from, rule_to))
+
+ # this child define an exclusion
+ elif ruleset.tag == 'exclusion':
+ # check if required tags available
+ if not ruleset.attrib.get('pattern'):
+ continue
+
+ exclusion_rgx = re.compile(ruleset.attrib.get('pattern'))
+
+ # append exclusion
+ exclusions.append(exclusion_rgx)
+
+ # convert list of possible hosts to a simple regex
+ # TODO compress regex to improve performance
+ try:
+ target_hosts = re.compile('^(' + '|'.join(hosts) + ')', re.I | re.U)
+ except:
+ return ()
+
+ # return ruleset
+ return (target_hosts, rules, exclusions)
+
+
+# load all https rewrite rules
+def load_https_rules(rules_path):
+ # add / to path if not set yet
+ if rules_path[-1:] != '/':
+ rules_path += '/'
+
+ # search all xml files which are stored in the https rule directory
+ xml_files = [ join(rules_path,f) for f in listdir(rules_path) if isfile(join(rules_path,f)) and f[-4:] == '.xml' ]
+
+ # load xml-files
+ for ruleset_file in xml_files:
+ # calculate rewrite-rules
+ ruleset = load_single_https_ruleset(ruleset_file)
+
+ # skip if no ruleset returned
+ if not ruleset:
+ continue
+
+ # append ruleset
+ https_rules.append(ruleset)
+
+ print(' * {n} https-rules loaded'.format(n=len(https_rules)))
diff --git a/searx/https_rules/00README b/searx/https_rules/00README
new file mode 100644
index 000000000..fcd8a7724
--- /dev/null
+++ b/searx/https_rules/00README
@@ -0,0 +1,17 @@
+<!--
+This directory contains web site rewriting rules for the
+HTTPS Everywhere software, available from
+https://www.eff.org/https-everywhere
+
+These rules were contributed to the project by users and aim to
+enable routine secure access to as many different web sites as
+possible. They are automatically installed together with the
+HTTPS Everywhere software. The presence of these rules does not
+mean that an HTTPS Everywhere user accessed, or intended to
+access, any particular web site.
+
+For information about how to create additional HTTPS Everywhere
+rewriting rules to add support for new sites, please see
+
+https://www.eff.org/https-everywhere/rulesets
+-->
diff --git a/searx/https_rules/Bing.xml b/searx/https_rules/Bing.xml
new file mode 100644
index 000000000..8b403f108
--- /dev/null
+++ b/searx/https_rules/Bing.xml
@@ -0,0 +1,56 @@
+<!--
+ For other Microsoft coverage, see Microsoft.xml.
+
+
+ CDN buckets:
+
+ - a134.lm.akamai.net
+
+ - akam.bing.com
+ - *.mm.bing.net
+
+
+ Nonfunctional domains:
+
+ - m2.cn.bing.com
+ - origin.bj1.bing.com
+ - blogs.bing.com
+
+
+ Fully covered domains:
+
+ - bing.com subdomains:
+
+ - (www.)
+ - c.bing (tracking beacons)
+ - cn.bing
+ - h.bing
+ - ssl
+ - testfamilysafety.bing
+ - udc.bing
+ - (www.)bing
+
+ - *.mm.bing.net
+ - api.bing.com
+
+-->
+<ruleset name="Bing">
+
+ <target host="bing.com" />
+ <target host="*.bing.com" />
+ <target host="*.mm.bing.net" />
+
+
+ <securecookie host=".*\.bing\.com$" name=".+" />
+
+
+ <rule from="^http://((?:c|cn|h|ssl|testfamilysafety|udc|www)\.)?bing\.com/"
+ to="https://$1bing.com/" />
+
+ <rule from="^http://([^/:@]*)\.mm\.bing\.net/"
+ to="https://$1.mm.bing.com/"/>
+
+ <rule from="^http://([^/:@]*)\.api\.bing\.net/"
+ to="https://$1.api.bing.com/"/>
+
+</ruleset>
diff --git a/searx/https_rules/Dailymotion.xml b/searx/https_rules/Dailymotion.xml
new file mode 100644
index 000000000..743100cb7
--- /dev/null
+++ b/searx/https_rules/Dailymotion.xml
@@ -0,0 +1,69 @@
+<!--
+ Nonfunctional domains:
+
+ - blog.dailymotion.com
+ - press.dailymotion.com (shows steaw.com, CN: www.steaw.com)
+ - proxy-46.dailymotion.com
+ - publicite.dailymotion.com
+ - publisher.dailymotion.com (reset)
+ - vid.ak.dmcdn.net (403, Akamai)
+ - vid2.ak.dmcdn.net (504, akamai)
+
+
+ Problematic domains:
+
+ - ak2.static.dailymotion.com (mismatched, CN: *.dmcdn.net)
+ - support.dmcloud.net (mismatched, CN: *.zendesk.com)
+
+
+ Partially covered domains:
+
+ - (www.)dailymotion.com
+
+ - cdn/manifest/video/\w+.mnft 403s
+ - crossdomain.xml breaks videos
+
+-->
+<ruleset name="Dailymotion (default off)" default_off="breaks some embedded videos">
+
+ <target host="dailymotion.com" />
+ <!--
+ * for cross-domain cookie.
+ -->
+ <target host="*.dailymotion.com" />
+ <!--
+ https://mail1.eff.org/pipermail/https-everywhere-rules/2012-July/001241.html
+ -->
+ <exclusion pattern="^http://(?:www\.)?dailymotion\.com/(?:cdn/[\w-]+/video/|crossdomain\.xml$)" />
+ <target host="ak2.static.dailymotion.com" />
+ <target host="*.dmcdn.net" />
+ <target host="dmcloud.net" />
+ <target host="*.dmcloud.net" />
+
+
+ <!-- Testing wrt embedded breakage.
+
+ securecookie host="^.*\.dailymotion\.com$" name=".+" /-->
+ <!--
+ Omniture tracking cookies:
+ -->
+ <securecookie host="^\.dailymotion\.com$" name="^s_\w+$" />
+ <securecookie host="^www\.dailymotion\.com$" name=".+" />
+
+
+ <rule from="^http://(erroracct\.|www\.)?dailymotion\.com/"
+ to="https://$1dailymotion.com/" />
+
+ <rule from="^http://(s\d|static(?:\d|s\d-ssl))\.dmcdn\.net/"
+ to="https://$1.dmcdn.net/" />
+
+ <rule from="^https?://ak2\.static\.dailymotion\.com/"
+ to="https://static1-ssl.dmcdn.net/" />
+
+ <rule from="^http://(s\.|www\.)?dmcloud\.net/"
+ to="https://$1dmcloud.net/" />
+
+ <rule from="^https?://support\.dmcloud\.net/"
+ to="https://dmcloud.zendesk.com/" />
+
+</ruleset>
diff --git a/searx/https_rules/Deviantart.xml b/searx/https_rules/Deviantart.xml
new file mode 100644
index 000000000..7830fc20f
--- /dev/null
+++ b/searx/https_rules/Deviantart.xml
@@ -0,0 +1,53 @@
+<!--
+ For problematic rules, see Deviantart-mismatches.xml.
+
+
+ Other deviantArt rulesets:
+
+ - Sta.sh.xml
+
+
+ ToDo: Find edgecast URL for /(fc|th)\d+.
+
+
+ Mixed content:
+
+ - Images on *.....com from e.deviantart.net *
+
+ * Secured by us
+
+-->
+<ruleset name="DeviantArt (pending)" default_off="site operator says not ready yet">
+
+ <target host="deviantart.com" />
+ <target host="*.deviantart.com" />
+ <target host="deviantart.net" />
+ <target host="*.deviantart.net" />
+
+
+ <!-- Not secured by server:
+ -->
+ <!--securecookie host="^\.deviantart\.com$" name="^userinfo$" /-->
+
+ <securecookie host="^\.deviantart\.com$" name=".*" />
+
+
+ <!-- Redirects from com to net, but does so successfully by itself.
+ -->
+ <rule from="^http://([aei]|fc\d\d|s[ht]|th\d\d)\.deviantart\.(com|net)/"
+ to="https://$1.deviantart.$2/" />
+
+ <!-- This handles everything that isn't in the first rule.
+ Namely, usernames, backend, fc, th, and (www.).
+ These domains present a cert that is only
+ valid for .com.
+ Note that .net isn't used on DA, but.net does
+ redirect to .com, and we shouldn't break what would
+ otherwise work.
+ Mustn't rewrite from https here, as doing so
+ would conflict with the first rule.
+ -->
+ <rule from="^http://([^/:@\.]+\.)?deviantart\.(?:com|net)/"
+ to="https://$1deviantart.com/" />
+
+</ruleset>
diff --git a/searx/https_rules/DuckDuckGo.xml b/searx/https_rules/DuckDuckGo.xml
new file mode 100644
index 000000000..173a9ad9f
--- /dev/null
+++ b/searx/https_rules/DuckDuckGo.xml
@@ -0,0 +1,38 @@
+<!--
+ Problematic domains:
+
+ - www.dukgo.com (mismatched, CN: dukgo.com)
+
+
+ Fully covered domains:
+
+ - (www.)dukgo.com (www → ^)
+
+-->
+<ruleset name="DuckDuckGo">
+ <target host="duckduckgo.com" />
+ <target host="*.duckduckgo.com" />
+ <target host="ddg.gg" />
+ <target host="duck.co" />
+ <target host="i.duck.co" />
+ <target host="dukgo.com" />
+ <target host="www.dukgo.com" />
+
+ <exclusion pattern="^http://(help|meme)\.duckduckgo\.com/" />
+
+ <securecookie host="^duck\.co$" name=".*"/>
+
+ <rule from="^http://duckduckgo\.com/" to="https://duckduckgo.com/"/>
+ <rule from="^http://([^/:@\.]+)\.duckduckgo\.com/" to="https://$1.duckduckgo.com/"/>
+ <!-- TODO: What does ddg.gg/foo do? Runs query foo, redirects to homepage, or error? -->
+ <rule from="^http://ddg\.gg/$" to="https://duckduckgo.com/" />
+
+ <rule from="^http://duck\.co/" to="https://duck.co/" />
+
+ <rule from="^http://i\.duck\.co/"
+ to="https://duckduckgo.com/"/>
+
+ <rule from="^http://(?:www\.)?dukgo\.com/"
+ to="https://dukgo.com/" />
+
+</ruleset>
diff --git a/searx/https_rules/Flickr.xml b/searx/https_rules/Flickr.xml
new file mode 100644
index 000000000..85c6e8065
--- /dev/null
+++ b/searx/https_rules/Flickr.xml
@@ -0,0 +1,44 @@
+<!--
+ For other Yahoo coverage, see Yahoo.xml.
+
+
+ These altnames don't exist:
+
+ - www.blog.flickr.net
+ - www.code.flickr.net
+
+-->
+<ruleset name="Flickr">
+
+ <target host="flic.kr" />
+ <target host="*.flic.kr" />
+ <target host="flickr.com" />
+ <target host="*.flickr.com" />
+ <target host="*.flickr.net" />
+ <target host="*.staticflickr.com" />
+
+
+ <!-- Not secured by server:
+ -->
+ <!--securecookie host="^\.flic\.kr$" name="^BX$" /-->
+
+ <securecookie host="^\.flic\.kr$" name=".+" />
+ <securecookie host=".*\.flickr\.com$" name=".+" />
+
+
+ <rule from="^http://flic\.kr/"
+ to="https://flic.kr/" />
+
+ <rule from="^http://(api\.|www\.)?flickr\.com/"
+ to="https://$1flickr.com/" />
+
+ <rule from="^http://s(ecure|tatic)\.flickr\.com/"
+ to="https://s$1.flickr.com/" />
+
+ <rule from="^http://(c2|farm\d+)\.static(\.)?flickr\.com/"
+ to="https://$1.static$2flickr.com/" />
+
+ <rule from="^http://(blog|code)\.flickr\.net/"
+ to="https://$1.flickr.net/" />
+
+</ruleset>
diff --git a/searx/https_rules/Github-Pages.xml b/searx/https_rules/Github-Pages.xml
new file mode 100644
index 000000000..d3be58a4c
--- /dev/null
+++ b/searx/https_rules/Github-Pages.xml
@@ -0,0 +1,11 @@
+<!--
+ For other GitHub coverage, see Github.xml.
+-->
+<ruleset name="GitHub Pages">
+
+ <target host="*.github.io" />
+
+ <rule from="^http://([^/@:\.]+)\.github\.io/"
+ to="https://$1.github.io/" />
+
+</ruleset>
diff --git a/searx/https_rules/Github.xml b/searx/https_rules/Github.xml
new file mode 100644
index 000000000..a9a3a1e53
--- /dev/null
+++ b/searx/https_rules/Github.xml
@@ -0,0 +1,94 @@
+<!--
+ Other GitHub rulesets:
+
+ - Github-Pages.xml
+ - Guag.es.xml
+ - Speaker_Deck.com.xml
+
+
+ CDN buckets:
+
+ - github-images.s3.amazonaws.com
+ - github.global.ssl.fastly.net
+ - a248.e.akamai.net/assets.github.com/
+ - a248.e.akamai.net/camo.github.com/
+ - s3.amazonaws.com/github/ | d24z2fz21y4fag.cloudfront.net
+ - github.myshopify.com
+
+
+ Fully covered domains:
+
+ - github.com subdomains:
+
+ - (www.)
+ - assets\d+
+ - assets-cdn
+ - bounty
+ - cloud
+ - f.cloud
+ - codeload
+ - developer
+ - eclipse
+ - enterprise
+ - gist
+ - gist-assets
+ - help
+ - identicons
+ - jobs
+ - mac
+ - mobile
+ - nodeload
+ - octodex
+ - pages
+ - raw
+ - rg3
+ - shop
+ - status
+ - support
+ - training
+ - try
+ - wiki
+ - windows
+
+ - collector.githubapp.com
+
+ - githubusercontent.com
+
+-->
+<ruleset name="GitHub">
+
+ <target host="github.com" />
+ <target host="*.github.com" />
+ <target host="github.io" />
+ <target host="*.githubusercontent.com" />
+ <target host="collector.githubapp.com" />
+
+
+ <!-- Secured by server:
+ -->
+ <!--securecookie host="^github\.com$" name="^(_gh_sess|tz|user_session)$" /-->
+ <!--securecookie host="^\.github\.com$" name="^(dotcom_user|logged_in)$" /-->
+ <!--securecookie host="^enterprise\.github\.com$" name="^(_enterprise_web|request_method)$" /-->
+ <!--securecookie host="^gist\.github\.com$" name="^_gist_session$" /-->
+ <!--securecookie host="^help\.github\.com$" name="^_help_session$" /-->
+ <!--
+ Not secured by server:
+ -->
+ <!--securecookie host="^status\.github\.com$" name="^rack\.session$" /-->
+
+ <securecookie host="^(?:.*\.)?github\.com$" name=".+" />
+
+
+ <rule from="^http://((?:assets\d+|assets-cdn|bounty|cloud|f\.cloud|codeload|developer|eclipse|enterprise|gist|gist-assets|help|identicons|jobs|mac|mobile|nodeload|octodex|pages|raw|rg3|shop|status|support|training|try|wiki|windows|www)\.)?github\.com/"
+ to="https://$1github.com/" />
+
+ <rule from="^http://collector\.githubapp\.com/"
+ to="https://collector.githubapp.com/" />
+
+ <rule from="^https?://github\.io/"
+ to="https://pages.github.com/" />
+
+ <rule from="^http://([^/@:\.]+)\.githubusercontent\.com/"
+ to="https://$1.githubusercontent.com/" />
+
+</ruleset>
diff --git a/searx/https_rules/Google-mismatches.xml b/searx/https_rules/Google-mismatches.xml
new file mode 100644
index 000000000..de9d3eb18
--- /dev/null
+++ b/searx/https_rules/Google-mismatches.xml
@@ -0,0 +1,26 @@
+<!--
+
+ Problematic domains:
+
+ - (www.)apture.com (works, mismatched, CN: *.google.com)
+
+-->
+<ruleset name="Google (mismatches)" default_off="mismatches">
+
+ <!-- Akamai -->
+ <target host="js.admeld.com"/>
+ <target host="apture.com" />
+ <target host="www.apture.com" />
+ <target host="googleartproject.com"/>
+ <target host="www.googleartproject.com"/>
+
+ <rule from="^http://js\.admeld\.com/"
+ to="https://js.admeld.com/"/>
+
+ <rule from="^https?://(?:www\.)?apture\.com/"
+ to="https://apture.com/" />
+
+ <rule from="^http://(?:www\.)?googleartproject\.com/"
+ to="https://www.googleartproject.com/"/>
+
+</ruleset>
diff --git a/searx/https_rules/Google.org.xml b/searx/https_rules/Google.org.xml
new file mode 100644
index 000000000..d6cc47881
--- /dev/null
+++ b/searx/https_rules/Google.org.xml
@@ -0,0 +1,14 @@
+<!--
+ For other Google coverage, see GoogleServices.xml.
+
+-->
+<ruleset name="Google.org">
+
+ <target host="google.org" />
+ <target host="www.google.org" />
+
+
+ <rule from="^http://(www\.)?google\.org/"
+ to="https://$1google.org/" />
+
+</ruleset> \ No newline at end of file
diff --git a/searx/https_rules/GoogleAPIs.xml b/searx/https_rules/GoogleAPIs.xml
new file mode 100644
index 000000000..85a5a8081
--- /dev/null
+++ b/searx/https_rules/GoogleAPIs.xml
@@ -0,0 +1,143 @@
+<!--
+ For other Google coverage, see GoogleServices.xml.
+
+
+ Nonfunctional domains:
+
+ - hosted.gmodules.com *
+ - img0.gmodules.com *
+ - p.gmodules.com *
+
+ * 404; mismatched, CN: *.googleusercontent.com
+
+
+ Problematic domains:
+
+ - gmodules.com (503, CN: www.google.com)
+ - www.gmodules.com (503, CN: *.googleusercontent.com)
+ - gstatic.com (404, valid cert)
+ - api.recaptcha.net (works; mismatched, CN: google.com)
+
+
+ Partially covered domains:
+
+ - (www.)gmodules.com (→ www.google.com)
+ - (www.)google.com
+ - chart.apis.google.com (→ chart.googleapis.com)
+
+
+ Fully covered domains:
+
+ - api.google.com
+
+ - *.clients.google.com:
+
+ - linkhelp
+
+ - ssl.google-analytics.com
+ - www.google-analytics.com
+
+ - googleapis.com subdomains:
+
+ - ajax
+ - chart
+ - *.commondatastorage
+ - fonts
+ - *.storage
+ - www
+
+ - gstatic.com subdomains:
+
+ - (www.) (^ → www)
+ - csi
+ - encrypted-tbn\d
+ - g0
+ - *.metric
+ - ssl
+ - t\d
+
+ - api.recaptcha.net (→ www.google.com)
+ - api-secure.recaptcha.net
+ - gdata.youtube.com
+
+
+ ssl.google-analytics.com/ga.js sets __utm\w wildcard
+ cookies on whichever domain it is loaded from.
+
+-->
+<ruleset name="Google APIs">
+
+ <target host="gmodules.com" />
+ <target host="www.gmodules.com" />
+ <target host="google.com" />
+ <target host="apis.google.com" />
+ <target host="*.apis.google.com" />
+ <target host="*.clients.google.com" />
+ <target host="www.google.com" />
+ <target host="*.google-analytics.com" />
+ <target host="*.googleapis.com" />
+ <target host="gstatic.com" />
+ <target host="*.gstatic.com" />
+ <!-- Captive portal detection redirects to this URL, and many captive
+ portals break TLS, so exempt this redirect URL.
+ See GitHub bug #368
+ -->
+ <exclusion pattern="^http://www\.gstatic\.com/generate_204" />
+ <target host="*.recaptcha.net" />
+ <target host="gdata.youtube.com" />
+ <exclusion pattern="^http://gdata\.youtube\.com/crossdomain\.xml" />
+
+
+ <securecookie host="^ssl\.google-analytics\.com$" name=".+" />
+
+
+ <rule from="^http://(?:www\.)?gmodules\.com/ig/images/"
+ to="https://www.google.com/ig/images/" />
+
+ <!-- jsapi was causing problems on some sites that embed google maps:
+ https://trac.torproject.org/projects/tor/ticket/2335
+ Apparently now fixed; thanks, Google!
+ -->
+ <rule from="^http://(?:www\.)?google\.com/(afsonline/|chart|jsapi|recaptcha/|uds)"
+ to="https://www.google.com/$1" />
+
+ <rule from="^http://(api|[\w-]+\.client)s\.google\.com/"
+ to="https://$1s.google.com/" />
+
+ <rule from="^http://chart\.apis\.google\.com/chart"
+ to="https://chart.googleapis.com/chart" />
+
+ <rule from="^http://(ssl|www)\.google-analytics\.com/"
+ to="https://$1.google-analytics.com/" />
+
+ <rule from="^http://(ajax|chart|fonts|www)\.googleapis\.com/"
+ to="https://$1.googleapis.com/" />
+
+ <rule from="^http://([^@:\./]+\.)?(commondata)?storage\.googleapis\.com/"
+ to="https://$1$2storage.googleapis.com/" />
+
+ <!-- There is an interesting question about whether we should
+ append &strip=1 to all cache URLs. This causes them to load
+ without images and styles, which is more secure but can look
+ worse.
+ Without &strip=1, the images and styles from the cached
+ pages still load from the original, typically unencrypted, page.
+ With &strip=1, the cached page will be text-only and
+ will come exclusively from Google's HTTPS server.
+ -->
+ <rule from="^http://(?:www\.)?gstatic\.com/"
+ to="https://www.gstatic.com/" />
+
+ <rule from="^http://(csi|encrypted-tbn\d|g0|[\w-]+\.metric|ssl|t\d)\.gstatic\.com/"
+ to="https://$1.gstatic.com/" />
+
+ <rule from="^http://api\.recaptcha\.net/"
+ to="https://www.google.com/recaptcha/api/" />
+
+ <rule from="^http://api-secure\.recaptcha\.net/"
+ to="https://api-secure.recaptcha.net/" />
+
+ <rule from="^http://gdata\.youtube\.com/"
+ to="https://gdata.youtube.com/" />
+
+</ruleset>
diff --git a/searx/https_rules/GoogleCanada.xml b/searx/https_rules/GoogleCanada.xml
new file mode 100644
index 000000000..d5eefe816
--- /dev/null
+++ b/searx/https_rules/GoogleCanada.xml
@@ -0,0 +1,6 @@
+<ruleset name="GoogleCanada">
+ <target host="google.ca" />
+ <target host="*.google.ca" />
+ <rule from="^http://([^/:@\.]+)\.google\.ca/finance" to="https://$1.google.ca/finance"/>
+</ruleset>
+
diff --git a/searx/https_rules/GoogleImages.xml b/searx/https_rules/GoogleImages.xml
new file mode 100644
index 000000000..0112001e0
--- /dev/null
+++ b/searx/https_rules/GoogleImages.xml
@@ -0,0 +1,65 @@
+<!--
+ For other Google coverage, see GoogleServices.xml.
+
+
+ Problematic domains:
+
+ - www.google.bo *
+ - www.google.co *
+ - www.google.ec *
+ - www.google.in *
+ - www.google.kr *
+ - www.google.com.kz **
+ - www.google.com.lk *
+ - www.google.mx **
+ - www.google.sg *
+ - www.google.sl *
+ - www.google.ug *
+ - www.google.vn *
+
+ * 404; mismatched, CN: google.com
+ ** Works; mismatched, CN: google.com
+
+-->
+<ruleset name="Google Images">
+
+ <target host="google.*" />
+ <target host="www.google.*" />
+ <target host="google.co.*" />
+ <target host="www.google.co.*" />
+ <target host="google.com" />
+ <target host="images.google.com" />
+ <target host="google.com.*" />
+ <target host="www.google.com.*" />
+ <!--
+ Only handle image-related paths in this ruleset:
+ -->
+ <exclusion pattern="^http://(?:www\.)?google(?:\.com?)?\.\w{2,3}/(?!(?:advanced_image_search|imghp|.*tb(?:m=isch|s=sbi)))" />
+
+
+ <rule from="^http://(?:www\.)?google\.com/"
+ to="https://www.google.com/" />
+
+ <rule from="^http://images\.google\.com/"
+ to="https://images.google.com/" />
+
+ <!-- First handle problematic domains:
+ -->
+ <rule from="^http://(?:www\.)?google\.co/"
+ to="https://www.google.com/" />
+
+ <rule from="^http://(?:www\.)?google\.(?:co\.)?(in|kr|ug)/"
+ to="https://www.google.co.$1/" />
+
+ <rule from="^http://(?:www\.)?google\.(?:com\.)?(kz|lk)/"
+ to="https://www.google.$1/" />
+
+ <rule from="^http://(?:www\.)?google\.(?:com\.)?(bo|ec|mx|sg|sl|vn)/"
+ to="https://www.google.com.$1/" />
+
+ <!-- And then the rest:
+ -->
+ <rule from="^http://(?:www\.)?google\.(com?\.)?(ae|ar|at|au|bg|bh|br|ca|ch|cl|co|cr|cu|de|eg|es|fi|fr|gh|gt|hr|id|ie|il|it|jo|jp|jm|ke|kw|lb|ly|my|na|ng|nl|no|nz|om|pa|pe|pk|pl|pt|py|qa|ro|ru|rw|sa|se|sv|th|tr|uk|uy|ve|za|zw)/"
+ to="https://www.google.$1$2/" />
+
+</ruleset>
diff --git a/searx/https_rules/GoogleMainSearch.xml b/searx/https_rules/GoogleMainSearch.xml
new file mode 100644
index 000000000..df504d90c
--- /dev/null
+++ b/searx/https_rules/GoogleMainSearch.xml
@@ -0,0 +1,78 @@
+<ruleset name="Search www.google.com">
+
+<!--
+Enabling this ruleset should cause searches to go to
+https://www.google.com rather than https://encrypted.google.com. Note that
+the filename is important; it must be before GoogleSearch.xml in a bash
+expansion of src/chrome/content/rules/*.xml in order to take precedence.
+-->
+
+ <target host="*.google.com" />
+ <target host="google.com" />
+ <target host="www.google.com.*" />
+ <target host="google.com.*" />
+ <target host="www.google.co.*" />
+ <target host="google.co.*" />
+ <target host="www.google.*" />
+ <target host="google.*" />
+ <!-- beyond clients1 these do not currently exist in the ccTLDs,
+ but just in case... -->
+ <target host="clients1.google.com.*" />
+ <target host="clients2.google.com.*" />
+ <target host="clients3.google.com.*" />
+ <target host="clients4.google.com.*" />
+ <target host="clients5.google.com.*" />
+ <target host="clients6.google.com.*" />
+ <target host="clients1.google.co.*" />
+ <target host="clients2.google.co.*" />
+ <target host="clients3.google.co.*" />
+ <target host="clients4.google.co.*" />
+ <target host="clients5.google.co.*" />
+ <target host="clients6.google.co.*" />
+ <target host="clients1.google.*" />
+ <target host="clients2.google.*" />
+ <target host="clients3.google.*" />
+ <target host="clients4.google.*" />
+ <target host="clients5.google.*" />
+ <target host="clients6.google.*" />
+
+ <rule from="^http://www\.google\.com/$"
+ to="https://www.google.com/"/>
+
+ <!-- The most basic case. -->
+
+ <rule from="^http://(?:www\.)?google\.com/search"
+ to="https://www.google.com/search"/>
+
+ <!-- A very annoying exception that we seem to need for the basic case -->
+
+ <exclusion pattern="^http://(?:www\.)?google\.com/search.*tbs=shop" />
+ <exclusion pattern="^http://clients[0-9]\.google\.com/.*client=products.*" />
+ <exclusion pattern="^http://suggestqueries\.google\.com/.*client=.*" />
+
+ <!-- https://trac.torproject.org/projects/tor/ticket/9713 -->
+
+ <exclusion pattern="^http://clients[0-9]\.google\.com/ocsp" />
+
+ <!-- This is necessary for image results links from web search results -->
+
+ <exclusion pattern="^http://(?:www\.)?google\.com/search.*tbm=isch.*" />
+
+ <rule from="^http://(?:www\.)?google\.com/webhp"
+ to="https://www.google.com/webhp"/>
+
+ <rule from="^http://(?:www\.)?google\.com/#"
+ to="https://www.google.com/#"/>
+
+ <rule from="^http://(?:www\.)?google\.com/$"
+ to="https://www.google.com/"/>
+
+ <!-- Completion urls look like this:
+
+http://clients2.google.co.jp/complete/search?hl=ja&client=hp&expIds=17259,24660,24729,24745&q=m&cp=1 HTTP/1.1\r\n
+
+ -->
+ <rule from="^http://clients[0-9]\.google\.com/complete/search"
+ to="https://clients1.google.com/complete/search"/>
+
+</ruleset>
diff --git a/searx/https_rules/GoogleMaps.xml b/searx/https_rules/GoogleMaps.xml
new file mode 100644
index 000000000..0f82c5267
--- /dev/null
+++ b/searx/https_rules/GoogleMaps.xml
@@ -0,0 +1,67 @@
+<!--
+ Problematic domains:
+
+ - khms *
+ - khms[0-3] *
+
+ * $ 404s
+
+
+ Fully covered domains:
+
+ - google.com subdomains:
+
+ - khms
+ - khms[0-3]
+
+-->
+<ruleset name="Google Maps">
+
+ <target host="maps.google.*" />
+ <!--
+ https://trac.torproject.org/projects/tor/ticket/8627
+ -->
+ <exclusion pattern="^http://maps\.google\.com/local_url" />
+ <exclusion pattern="^http://maps\.google\.gr/transitathens" />
+ <target host="maps.google.co.*" />
+ <target host="khms.google.com" />
+ <target host="khms0.google.com" />
+ <target host="khms1.google.com" />
+ <target host="khms2.google.com" />
+ <target host="khms3.google.com" />
+ <target host="maps-api-ssl.google.com" />
+ <target host="mw2.google.com" />
+ <target host="maps.google.com.*" />
+ <target host="maps.googleapis.com" />
+ <!--
+ https://mail1.eff.org/pipermail/https-everywhere-rules/2012-September/001317.html
+ -->
+ <!--exclusion pattern="^http://maps\.googleapis\.com/map(files/lib/map_1_20\.swf|sapi/publicapi\?file=flashapi)" /-->
+ <exclusion pattern="^http://maps\.googleapis\.com/map(?:files/lib/map_\d+_\d+\.swf|sapi/publicapi\?file=flashapi)" />
+ <target host="maps.gstatic.com" />
+
+
+ <!--securecookie host="^maps\.google\.(com?\.)?(au|ca|gh|ie|in|jm|ke|lk|my|n[agz]|pk|rw|sl|sg|ug|uk|za|zw)$" name=".+" /-->
+ <securecookie host="^maps\.google\.[\w.]{2,6}$" name=".+" />
+ <securecookie host="^maps\.g(?:oogle|oogleapis|static)\.com$" name=".+" />
+ <securecookie host="^maps-api-ssl\.google\.com$" name=".+" />
+
+
+ <rule from="^http://maps\.google\.([^/]+)/"
+ to="https://maps.google.$1/" />
+
+ <!-- http://khms.../$ 404s:
+ -->
+ <rule from="^http://khms\d?\.google\.com/+\??$"
+ to="https://www.google.com/" />
+
+ <rule from="^http://(khms\d?|maps-api-ssl|mw2)\.google\.com/"
+ to="https://$1.google.com/" />
+
+ <rule from="^http://maps\.g(oogleapis|static)\.com/"
+ to="https://maps.g$1.com/" />
+
+ <rule from="^https://maps\.googleapis\.com/map(?=files/lib/map_\d+_\d+\.swf|sapi/publicapi\?file=flashapi)"
+ to="http://maps.googleapis.com/map" downgrade="1" />
+
+</ruleset>
diff --git a/searx/https_rules/GoogleMelange.xml b/searx/https_rules/GoogleMelange.xml
new file mode 100644
index 000000000..ec23cd45f
--- /dev/null
+++ b/searx/https_rules/GoogleMelange.xml
@@ -0,0 +1,6 @@
+<ruleset name="GoogleMelange">
+ <target host="www.google-melange.com" />
+ <target host="google-melange.com" />
+
+ <rule from="^http://(www\.)?google-melange\.com/" to="https://www.google-melange.com/" />
+</ruleset>
diff --git a/searx/https_rules/GoogleSearch.xml b/searx/https_rules/GoogleSearch.xml
new file mode 100644
index 000000000..66b7ffdb0
--- /dev/null
+++ b/searx/https_rules/GoogleSearch.xml
@@ -0,0 +1,135 @@
+<ruleset name="Google Search">
+
+ <target host="google.com" />
+ <target host="*.google.com" />
+ <target host="google.com.*" />
+ <target host="www.google.com.*" />
+ <target host="google.co.*" />
+ <target host="www.google.co.*" />
+ <target host="google.*" />
+ <target host="www.google.*" />
+ <!--
+ Beyond clients1 these do not currently
+ exist in the ccTLDs, but just in case...
+ -->
+ <target host="clients1.google.com.*" />
+ <target host="clients2.google.com.*" />
+ <target host="clients3.google.com.*" />
+ <target host="clients4.google.com.*" />
+ <target host="clients5.google.com.*" />
+ <target host="clients6.google.com.*" />
+ <target host="clients1.google.co.*" />
+ <target host="clients2.google.co.*" />
+ <target host="clients3.google.co.*" />
+ <target host="clients4.google.co.*" />
+ <target host="clients5.google.co.*" />
+ <target host="clients6.google.co.*" />
+ <target host="clients1.google.*" />
+ <target host="clients2.google.*" />
+ <target host="clients3.google.*" />
+ <target host="clients4.google.*" />
+ <target host="clients5.google.*" />
+ <target host="clients6.google.*" />
+
+
+ <!-- Some Google pages can generate naive links back to the
+ unencrypted version of encrypted.google.com, which is
+ a 301 but theoretically vulnerable to SSL stripping.
+ -->
+ <rule from="^http://encrypted\.google\.com/"
+ to="https://encrypted.google.com/" />
+
+ <!-- The most basic case.
+ -->
+ <rule from="^http://(?:www\.)?google\.com/search"
+ to="https://encrypted.google.com/search" />
+
+ <!-- A very annoying exception that we
+ seem to need for the basic case
+ -->
+ <exclusion pattern="^http://(?:www\.)?google\.com/search.*tbs=shop" />
+ <exclusion pattern="^http://clients\d\.google\.com/.*client=products.*" />
+ <exclusion pattern="^http://suggestqueries\.google\.com/.*client=.*" />
+
+ <!-- https://trac.torproject.org/projects/tor/ticket/9713
+ -->
+
+ <exclusion pattern="^http://clients[0-9]\.google\.com/ocsp" />
+
+
+ <!-- This is necessary for image results
+ links from web search results
+ -->
+ <exclusion pattern="^http://(?:www\.)?google\.com/search.*tbm=isch.*" />
+
+ <rule from="^http://(?:www\.)?google\.com/about"
+ to="https://www.google.com/about" />
+
+ <!-- There are two distinct cases for these firefox searches -->
+
+ <rule from="^http://(?:www\.)?google(?:\.com?)?\.[a-z]{2}/firefox/?$"
+ to="https://encrypted.google.com/" />
+
+ <rule from="^http://(?:www\.)?google(?:\.com?)?\.[a-z]{2}/firefox"
+ to="https://encrypted.google.com/webhp" />
+
+ <rule from="^http://(?:www\.)?google\.com/webhp"
+ to="https://encrypted.google.com/webhp" />
+
+ <rule from="^http://codesearch\.google\.com/"
+ to="https://codesearch.google.com/" />
+
+ <rule from="^http://(?:www\.)?google\.com/codesearch"
+ to="https://www.google.com/codesearch" />
+
+ <rule from="^http://(?:www\.)?google\.com/#"
+ to="https://encrypted.google.com/#" />
+
+ <rule from="^http://(?:www\.)?google\.com/$"
+ to="https://encrypted.google.com/" />
+
+ <!-- Google supports IPv6 search, including
+ HTTPS with a valid certificate! -->
+ <rule from="^http://ipv6\.google\.com/"
+ to="https://ipv6.google.com/" />
+
+ <!-- most google international sites look like
+ "google.fr", some look like "google.co.jp",
+ and some crazy ones like "google.com.au" -->
+
+ <rule from="^http://(www\.)?google(\.com?)?\.([a-z]{2})/(search\?|#)"
+ to="https://$1google$2.$3/$4" />
+
+ <!-- Language preference setting -->
+ <rule from="^http://(www\.)?google(\.com?)?\.([a-z]{2})/setprefs"
+ to="https://$1google$2.$3/setprefs" />
+
+ <!-- Completion urls look like this:
+
+http://clients2.google.co.jp/complete/search?hl=ja&client=hp&expIds=17259,24660,24729,24745&q=m&cp=1 HTTP/1.1\r\n
+
+ -->
+ <rule from="^http://clients\d\.google\.com/complete/search"
+ to="https://clients1.google.com/complete/search" />
+
+ <rule from="^http://clients\d\.google(\.com?\.[a-z]{2})/complete/search"
+ to="https://clients1.google.$1/complete/search" />
+
+ <rule from="^http://clients\d\.google\.([a-z]{2})/complete/search"
+ to="https://clients1.google.$1/complete/search" />
+
+ <rule from="^http://suggestqueries\.google\.com/complete/search"
+ to="https://clients1.google.com/complete/search" />
+
+ <rule from="^http://(www\.)?google\.(com?\.)?([a-z]{2})/(?:webhp)?$"
+ to="https://$1google.$2$3/" />
+
+ <!-- If there are URL parameters, keep them. -->
+ <rule from="^http://(www\.)?google\.(com?\.)?([a-z]{2})/(?:webhp)?\?"
+ to="https://$1google.$2$3/webhp?" />
+
+ <!-- teapot -->
+ <rule from="^http://(www\.)?google(\.com?)?\.([a-z]{2})/teapot"
+ to="https://$1google$2.$3/teapot" />
+
+</ruleset>
diff --git a/searx/https_rules/GoogleServices.xml b/searx/https_rules/GoogleServices.xml
new file mode 100644
index 000000000..704646b53
--- /dev/null
+++ b/searx/https_rules/GoogleServices.xml
@@ -0,0 +1,345 @@
+<!--
+ Other Google rulesets:
+
+ - 2mdn.net.xml
+ - Admeld.xml
+ - ChannelIntelligence.com.xml
+ - Doubleclick.net.xml
+ - FeedBurner.xml
+ - Google.org.xml
+ - GoogleAPIs.xml
+ - Google_App_Engine.xml
+ - GoogleImages.xml
+ - GoogleShopping.xml
+ - Ingress.xml
+ - Meebo.xml
+ - Orkut.xml
+ - Postini.xml
+ - WebM_Project.org.xml
+
+
+ Nonfunctional domains:
+
+ - feedproxy.google.com (404, valid cert)
+ - partnerpage.google.com *
+ - safebrowsing.clients.google.com (404, mismatched)
+ - (www.)googlesyndicatedsearch.com (404; mismatched, CN: google.com)
+ - buttons.googlesyndication.com *
+
+ * 404, valid cert
+
+
+ Nonfunctional google.com paths:
+
+ - analytics (redirects to http)
+ - imgres
+ - gadgets *
+ - hangouts (404)
+ - u/ (404)
+
+ * Redirects to http
+
+
+ Problematic domains:
+
+ - www.goo.gl (404; mismatched, CN: *.google.com)
+
+ - google.com subdomains:
+
+ - books (googlebooks/, images/, & intl/ 404, but works when rewritten to www)
+ - cbks0 ****
+ - earth *
+ - gg ($ 404s)
+ - knoll *
+ - scholar **
+ - trends *
+
+ - news.google.cctld **
+ - scholar.google.cctld **
+ - *-opensocial.googleusercontent.com ***
+
+ **** $ 404s
+ * 404, valid cert
+ ** Redirects to http, valid cert
+ *** Breaks followers widget - https://trac.torproject.org/projects/tor/ticket/7294
+
+
+ Partially covered domains:
+
+ - google.cctld subdomains:
+
+ - scholar (→ www)
+
+ - google.com subdomains:
+
+ - (www.)
+ - cbks0 ($ 404s)
+ - gg ($ 404s)
+ - news (→ www)
+ - scholar (→ www)
+
+ - *.googleusercontent.com (*-opensocial excluded)
+
+
+ Fully covered domains:
+
+ - lh[3-6].ggpht.com
+ - (www.)goo.gl (www → ^)
+
+ - google.com subdomains:
+
+ - accounts
+ - adwords
+ - apis
+ - appengine
+ - books (→ encrypted)
+ - calendar
+ - checkout
+ - chrome
+ - clients[12]
+ - code
+ - *.corp
+ - developers
+ - dl
+ - docs
+ - docs\d
+ - \d.docs
+ - drive
+ - earth (→ www)
+ - encrypted
+ - encrypted-tbn[123]
+ - feedburner
+ - fiber
+ - finance
+ - glass
+ - groups
+ - health
+ - helpouts
+ - history
+ - hostedtalkgadget
+ - id
+ - investor
+ - knol
+ - knoll (→ knol)
+ - lh\d
+ - mail
+ - chatenabled.mail
+ - pack
+ - picasaweb
+ - pki
+ - play
+ - plus
+ - plusone
+ - productforums
+ - profiles
+ - safebrowsing-cache
+ - cert-test.sandbox
+ - plus.sandbox
+ - sb-ssl
+ - script
+ - security
+ - services
+ - servicessites
+ - sites
+ - spreadsheets
+ - spreadsheets\d
+ - support
+ - talk
+ - talkgadget
+ - tbn2 (→ encrypted-tbn2)
+ - tools
+ - trends (→ www)
+
+ - partner.googleadservices.com
+ - (www.)googlecode.com
+ - *.googlecode.com (per-project subdomains)
+ - googlesource.com
+ - *.googlesource.com
+ - pagead2.googlesyndication.com
+ - tpc.googlesyndication.com
+ - mail-attachment.googleusercontent.com
+ - webcache.googleusercontent.com
+
+
+ XXX: Needs more testing
+
+-->
+<ruleset name="Google Services">
+
+ <target host="*.ggpht.com" />
+ <target host="gmail.com" />
+ <target host="www.gmail.com" />
+ <target host="goo.gl" />
+ <target host="www.goo.gl" />
+ <target host="google.*" />
+ <target host="accounts.google.*" />
+ <target host="adwords.google.*" />
+ <target host="finance.google.*" />
+ <target host="groups.google.*" />
+ <target host="it.google.*" />
+ <target host="news.google.*" />
+ <exclusion pattern="^http://(?:news\.)?google\.com/(?:archivesearch|newspapers)" />
+ <target host="picasaweb.google.*" />
+ <target host="scholar.google.*" />
+ <target host="www.google.*" />
+ <target host="*.google.ca" />
+ <target host="google.co.*" />
+ <target host="accounts.google.co.*" />
+ <target host="adwords.google.co.*" />
+ <target host="finance.google.co.*" />
+ <target host="groups.google.co.*" />
+ <target host="id.google.co.*" />
+ <target host="news.google.co.*" />
+ <target host="picasaweb.google.co.*" />
+ <target host="scholar.google.co.*" />
+ <target host="www.google.co.*" />
+ <target host="google.com" />
+ <target host="*.google.com" />
+ <exclusion pattern="^http://(?:www\.)?google\.com/analytics/*(?:/[^/]+)?(?:\?.*)?$" />
+ <!--exclusion pattern="^http://books\.google\.com/(?!books/(\w+\.js|css/|javascript/)|favicon\.ico|googlebooks/|images/|intl/)" /-->
+ <exclusion pattern="^http://cbks0\.google\.com/(?:$|\?)" />
+ <exclusion pattern="^http://gg\.google\.com/(?!csi(?:$|\?))" />
+ <target host="google.com.*" />
+ <target host="accounts.google.com.*" />
+ <target host="adwords.google.com.*" />
+ <target host="groups.google.com.*" />
+ <target host="id.google.com.*" />
+ <target host="news.google.com.*" />
+ <target host="picasaweb.google.com.*" />
+ <target host="scholar.google.com.*" />
+ <target host="www.google.com.*" />
+ <target host="partner.googleadservices.com" />
+ <target host="googlecode.com" />
+ <target host="*.googlecode.com" />
+ <target host="googlemail.com" />
+ <target host="www.googlemail.com" />
+ <target host="googlesource.com" />
+ <target host="*.googlesource.com" />
+ <target host="*.googlesyndication.com" />
+ <target host="www.googletagservices.com" />
+ <target host="googleusercontent.com" />
+ <target host="*.googleusercontent.com" />
+ <!--
+ Necessary for the Followers widget:
+
+ https://trac.torproject.org/projects/tor/ticket/7294
+ -->
+ <exclusion pattern="http://[^@:\./]+-opensocial\.googleusercontent\.com" />
+
+
+ <!-- Can we secure any of these wildcard cookies safely?
+ -->
+ <!--securecookie host="^\.google\.com$" name="^(hl|I4SUserLocale|NID|PREF|S)$" /-->
+ <!--securecookie host="^\.google\.[\w.]{2,6}$" name="^(hl|I4SUserLocale|NID|PREF|S|S_awfe)$" /-->
+ <securecookie host="^(?:accounts|adwords|\.code|login\.corp|developers|docs|\d\.docs|fiber|mail|picasaweb|plus|\.?productforums|support)\.google\.[\w.]{2,6}$" name=".+" />
+ <securecookie host="^www\.google\.com$" name="^GoogleAccountsLocale_session$" />
+ <securecookie host="^mail-attachment\.googleusercontent\.com$" name=".+" />
+ <securecookie host="^gmail\.com$" name=".+" />
+ <securecookie host="^www\.gmail\.com$" name=".+" />
+ <securecookie host="^googlemail\.com$" name=".+" />
+ <securecookie host="^www\.googlemail\.com$" name=".+" />
+
+
+ <!-- - lh 3-6 exist
+ - All appear identical
+ - Identical to lh\d.googleusercontent.com
+ -->
+ <rule from="^http://lh(\d)\.ggpht\.com/"
+ to="https://lh$1.ggpht.com/" />
+
+ <rule from="^http://lh(\d)\.google\.ca/"
+ to="https://lh$1.google.ca/" />
+
+
+ <rule from="^http://(www\.)?g(oogle)?mail\.com/"
+ to="https://$1g$2mail.com/" />
+
+ <rule from="^http://(?:www\.)?goo\.gl/"
+ to="https://goo.gl/" />
+
+
+ <!-- Redirects to http when rewritten to www:
+ -->
+ <rule from="^http://books\.google\.com/"
+ to="https://encrypted.google.com/" />
+
+ <!-- tisp$ 404s:
+ -->
+ <rule from="^http://(?:www\.)?google\.((?:com?\.)?\w{2,3})/tisp(?=$|\?)"
+ to="https://www.google.$1/tisp/" />
+
+ <!-- Paths that work on all in google.*
+ -->
+ <rule from="^http://(?:www\.)?google\.((?:com?\.)?\w{2,3})/(accounts|adplanner|ads|adsense|adwords|analytics|bookmarks|chrome|contacts|coop|cse|css|culturalinstitute|doodles|earth|favicon\.ico|finance|get|goodtoknow|googleblogs|grants|green|hostednews|images|intl|js|landing|logos|mapmaker|newproducts|news|nexus|patents|policies|prdhp|profiles|products|reader|s2|settings|shopping|support|tisp|tools|transparencyreport|trends|urchin|webmasters)(?=$|[?/])"
+ to="https://www.google.$1/$2" />
+
+ <!-- Paths that 404 on .ccltd, but work on .com:
+ -->
+ <rule from="^http://(?:www\.)?google\.(?:com?\.)?\w{2,3}/(?=calendar|dictionary|doubleclick|help|ideas|pacman|postini|powermeter|url)"
+ to="https://www.google.com/" />
+
+ <rule from="^http://(?:www\.)?google\.(?:com?\.)?\w{2,3}/custom"
+ to="https://www.google.com/cse" />
+
+ <!-- Paths that only exist/work on .com
+ -->
+ <rule from="^http://(?:www\.)?google\.com/(\+|appsstatus|books|buzz|extern_js|glass|googlebooks|ig|insights|moderator|phone|safebrowsing|videotargetting|webfonts)(?=$|[?/])"
+ to="https://www.google.com/$1" />
+
+ <!-- Subdomains that work on all in google.*
+ -->
+ <rule from="^http://(accounts|adwords|finance|groups|id|picasaweb|)\.google\.((?:com?\.)?\w{2,3})/"
+ to="https://$1.google.$2/" />
+
+ <!-- Subdomains that only exist/work on .com
+ -->
+ <rule from="^http://(apis|appengine|books|calendar|cbks0|chat|checkout|chrome|clients[12]|code|[\w-]+\.corp|developers|dl|docs\d?|\d\.docs|drive|encrypted|encrypted-tbn[123]|feedburner|fiber|fonts|gg|glass||health|helpouts|history|(?:hosted)?talkgadget|investor|lh\d|(?:chatenabled\.)?mail|pack|pki|play|plus(?:\.sandbox)?|plusone|productforums|profiles|safebrowsing-cache|cert-test\.sandbox|sb-ssl|script|security|services|servicessites|sites|spreadsheets\d?|support|talk|tools)\.google\.com/"
+ to="https://$1.google.com/" />
+
+ <exclusion pattern="^http://clients[0-9]\.google\.com/ocsp"/>
+
+ <rule from="^http://earth\.google\.com/"
+ to="https://www.google.com/earth/" />
+
+ <rule from="^http://scholar\.google\.((?:com?\.)?\w{2,3})/intl/"
+ to="https://www.google.$1/intl/" />
+
+ <rule from="^http://(?:encrypted-)?tbn2\.google\.com/"
+ to="https://encrypted-tbn2.google.com/" />
+
+
+ <rule from="^http://knoll?\.google\.com/"
+ to="https://knol.google.com/" />
+
+
+ <rule from="^http://news\.google\.(?:com?\.)?\w{2,3}/(?:$|news|newshp)"
+ to="https://www.google.com/news" />
+
+ <rule from="^http://trends\.google\.com/"
+ to="https://www.google.com/trends" />
+
+
+ <rule from="^http://([^/:@\.]+\.)?googlecode\.com/"
+ to="https://$1googlecode.com/" />
+
+ <rule from="^http://([^\./]\.)?googlesource\.com/"
+ to="https://$1googlesource.com/" />
+
+
+ <rule from="^http://partner\.googleadservices\.com/"
+ to="https://partner.googleadservices.com/" />
+
+ <rule from="^http://(pagead2|tpc)\.googlesyndication\.com/"
+ to="https://$1.googlesyndication.com/" />
+
+ <!-- !www doesn't exist.
+ -->
+ <rule from="^http://www\.googletagservices\.com/tag/js/"
+ to="https://www.googletagservices.com/tag/js/" />
+
+
+ <rule from="^http://([^@:\./]+)\.googleusercontent\.com/"
+ to="https://$1.googleusercontent.com/" />
+
+
+</ruleset>
diff --git a/searx/https_rules/GoogleShopping.xml b/searx/https_rules/GoogleShopping.xml
new file mode 100644
index 000000000..6ba69a91d
--- /dev/null
+++ b/searx/https_rules/GoogleShopping.xml
@@ -0,0 +1,28 @@
+<!--
+ For other Google coverage, see GoogleServices.xml.
+
+-->
+<ruleset name="Google Shopping">
+
+ <target host="google.*" />
+ <target host="www.google.*" />
+ <target host="google.co.*" />
+ <target host="www.google.co.*" />
+ <target host="*.google.com" />
+ <target host="google.com.*" />
+ <target host="www.google.com.*" />
+
+
+ <rule from="^http://encrypted\.google\.com/(prdhp|shopping)"
+ to="https://www.google.com/$1" />
+
+ <rule from="^http://shopping\.google\.com/"
+ to="https://shopping.google.com/" />
+
+ <rule from="^http://(?:encrypted|www)\.google\.com/(.*tbm=shop)"
+ to="https://www.google.com/$1" />
+
+ <rule from="^http://(?:www\.)?google\.((?:com?\.)?(?:ae|ar|at|au|bg|bh|bo|br|ca|ch|cl|cr|co|cu|de|ec|eg|es|fi|fr|gh|gt|hr|id|ie|il|in|it|jm|jo|jp|ke|kr|kw|kz|lb|lk|ly|mx|my|na|ng|nl|no|nz|om|pa|pe|pk|pl|pt|py|qa|ro|ru|rw|sa|sg|sl|se|sv|th|tr|ug|uk|uy|ve|vn|za|zw))/(?=prdhp|shopping)"
+ to="https://www.google.com/$1" />
+
+</ruleset>
diff --git a/searx/https_rules/GoogleSorry.xml b/searx/https_rules/GoogleSorry.xml
new file mode 100644
index 000000000..72a19210d
--- /dev/null
+++ b/searx/https_rules/GoogleSorry.xml
@@ -0,0 +1,7 @@
+<ruleset name="GoogleSorry">
+ <target host="sorry.google.com" />
+ <target host="www.google.com" />
+ <target host="google.com" />
+
+ <rule from="^http://((sorry|www)\.)?google\.com/sorry/" to="https://sorry.google.com/sorry/" />
+</ruleset>
diff --git a/searx/https_rules/GoogleTranslate.xml b/searx/https_rules/GoogleTranslate.xml
new file mode 100644
index 000000000..a004025ae
--- /dev/null
+++ b/searx/https_rules/GoogleTranslate.xml
@@ -0,0 +1,8 @@
+<ruleset name="Google Translate (broken)" default_off="redirect loops">
+ <target host="translate.googleapis.com" />
+ <target host="translate.google.com" />
+
+ <rule from="^http://translate\.googleapis\.com/" to="https://translate.googleapis.com/"/>
+ <rule from="^http://translate\.google\.com/"
+ to="https://translate.google.com/" />
+</ruleset>
diff --git a/searx/https_rules/GoogleVideos.xml b/searx/https_rules/GoogleVideos.xml
new file mode 100644
index 000000000..a5e88fcf0
--- /dev/null
+++ b/searx/https_rules/GoogleVideos.xml
@@ -0,0 +1,83 @@
+<ruleset name="Google Videos">
+ <target host="*.google.com" />
+ <target host="google.com" />
+ <target host="www.google.com.*" />
+ <target host="google.com.*" />
+ <target host="www.google.co.*" />
+ <target host="google.co.*" />
+ <target host="www.google.*" />
+ <target host="google.*" />
+
+ <rule from="^http://encrypted\.google\.com/videohp"
+ to="https://encrypted.google.com/videohp" />
+
+ <!-- https://videos.google.com is currently broken; work around that... -->
+ <rule from="^https?://videos?\.google\.com/$"
+ to="https://encrypted.google.com/videohp" />
+ <rule from="^http://(?:www\.)?google\.com/videohp"
+ to="https://encrypted.google.com/videohp" />
+ <rule from="^http://(?:images|www|encrypted)\.google\.com/(.*tbm=isch)"
+ to="https://encrypted.google.com/$1" />
+
+ <rule
+ from="^http://(?:www\.)?google\.(?:com?\.)?(?:au|ca|gh|ie|in|jm|ke|lk|my|na|ng|nz|pk|rw|sl|sg|ug|uk|za|zw)/videohp"
+ to="https://encrypted.google.com/videohp" />
+ <rule
+ from="^http://(?:www\.)?google\.(?:com?\.)?(?:ar|bo|cl|co|cu|cr|ec|es|gt|mx|pa|pe|py|sv|uy|ve)/videohp$"
+ to="https://encrypted.google.com/videohp?hl=es" />
+ <rule
+ from="^http://(?:www\.)?google\.(?:com\.)?(?:ae|bh|eg|jo|kw|lb|ly|om|qa|sa)/videohp$"
+ to="https://encrypted.google.com/videohp?hl=ar" />
+ <rule from="^http://(?:www\.)?google\.(?:at|ch|de)/videohp$"
+ to="https://encrypted.google.com/videohp?hl=de" />
+ <rule from="^http://(?:www\.)?google\.(fr|nl|it|pl|ru|bg|pt|ro|hr|fi|no)/videohp$"
+ to="https://encrypted.google.com/videohp?hl=$1" />
+ <rule from="^http://(?:www\.)?google\.com?\.(id|th|tr)/videohp$"
+ to="https://encrypted.google.com/videohp?hl=$1" />
+ <rule from="^http://(?:www\.)?google\.com\.il/videohp$"
+ to="https://encrypted.google.com/videohp?hl=he" />
+ <rule from="^http://(?:www\.)?google\.com\.kr/videohp$"
+ to="https://encrypted.google.com/videohp?hl=ko" />
+ <rule from="^http://(?:www\.)?google\.com\.kz/videohp$"
+ to="https://encrypted.google.com/videohp?hl=kk" />
+ <rule from="^http://(?:www\.)?google\.com\.jp/videohp$"
+ to="https://encrypted.google.com/videohp?hl=ja" />
+ <rule from="^http://(?:www\.)?google\.com\.vn/videohp$"
+ to="https://encrypted.google.com/videohp?hl=vi" />
+ <rule from="^http://(?:www\.)?google\.com\.br/videohp$"
+ to="https://encrypted.google.com/videohp?hl=pt-BR" />
+ <rule from="^http://(?:www\.)?google\.se/videohp$"
+ to="https://encrypted.google.com/videohp?hl=sv" />
+
+<!-- If there are URL parameters, keep them. -->
+ <rule
+ from="^http://(?:www\.)?google\.(?:com?\.)?(?:ar|bo|cl|co|cu|cr|ec|es|gt|mx|pa|pe|py|sv|uy|ve)/videohp\?"
+ to="https://encrypted.google.com/videohp?hl=es&#38;" />
+ <rule
+ from="^http://(?:www\.)?google\.(?:com\.)?(?:ae|bh|eg|jo|kw|lb|ly|om|qa|sa)/videohp\?"
+ to="https://encrypted.google.com/videohp?hl=ar&#38;" />
+ <rule from="^http://(?:www\.)?google\.(?:at|ch|de)/videohp\?"
+ to="https://encrypted.google.com/videohp?hl=de&#38;" />
+ <rule from="^http://(?:www\.)?google\.(fr|nl|it|pl|ru|bg|pt|ro|hr|fi|no)/videohp\?"
+ to="https://encrypted.google.com/videohp?hl=$1&#38;" />
+ <rule from="^http://(?:www\.)?google\.com?\.(id|th|tr)/videohp\?"
+ to="https://encrypted.google.com/videohp?hl=$1&#38;" />
+ <rule from="^http://(?:www\.)?google\.com\.il/videohp\?"
+ to="https://encrypted.google.com/videohp?hl=he&#38;" />
+ <rule from="^http://(?:www\.)?google\.com\.kr/videohp\?"
+ to="https://encrypted.google.com/videohp?hl=ko&#38;" />
+ <rule from="^http://(?:www\.)?google\.com\.kz/videohp\?"
+ to="https://encrypted.google.com/videohp?hl=kk&#38;" />
+ <rule from="^http://(?:www\.)?google\.com\.jp/videohp\?"
+ to="https://encrypted.google.com/videohp?hl=ja&#38;" />
+ <rule from="^http://(?:www\.)?google\.com\.vn/videohp\?"
+ to="https://encrypted.google.com/videohp?hl=vi&#38;" />
+ <rule from="^http://(?:www\.)?google\.com\.br/videohp\?"
+ to="https://encrypted.google.com/videohp?hl=pt-BR&#38;" />
+ <rule from="^http://(?:www\.)?google\.se/videohp\?"
+ to="https://encrypted.google.com/videohp?hl=sv&#38;" />
+
+ <rule from="^http://video\.google\.com/ThumbnailServer2"
+ to="https://video.google.com/ThumbnailServer2" />
+
+</ruleset>
diff --git a/searx/https_rules/GoogleWatchBlog.xml b/searx/https_rules/GoogleWatchBlog.xml
new file mode 100644
index 000000000..afec70c97
--- /dev/null
+++ b/searx/https_rules/GoogleWatchBlog.xml
@@ -0,0 +1,17 @@
+<!--
+ gwbhrd.appspot.com
+
+-->
+<ruleset name="GoogleWatchBlog">
+
+ <target host="googlewatchblog.de" />
+ <target host="*.googlewatchblog.de" />
+
+
+ <securecookie host="^(?:www)?\.googlewatchblog\.de$" name=".+" />
+
+
+ <rule from="^http://(static\.|www\.)?googlewatchblog\.de/"
+ to="https://$1googlewatchblog.de/" />
+
+</ruleset> \ No newline at end of file
diff --git a/searx/https_rules/Google_App_Engine.xml b/searx/https_rules/Google_App_Engine.xml
new file mode 100644
index 000000000..851e051d1
--- /dev/null
+++ b/searx/https_rules/Google_App_Engine.xml
@@ -0,0 +1,21 @@
+<!--
+ For other Google coverage, see GoogleServices.xml.
+
+-->
+<ruleset name="Google App Engine">
+
+ <target host="appspot.com" />
+ <target host="*.appspot.com" />
+ <!--
+ Redirects to http for some reason.
+ -->
+ <exclusion pattern="^http://photomunchers\.appspot\.com/" />
+
+
+ <securecookie host="^.+\.appspot\.com$" name=".+" />
+
+
+ <rule from="^http://([^@:\./]+\.)?appspot\.com/"
+ to="https://$1appspot.com/" />
+
+</ruleset> \ No newline at end of file
diff --git a/searx/https_rules/Googleplex.com.xml b/searx/https_rules/Googleplex.com.xml
new file mode 100644
index 000000000..7ddbb5ba9
--- /dev/null
+++ b/searx/https_rules/Googleplex.com.xml
@@ -0,0 +1,16 @@
+<!-- This rule was automatically generated based on an HSTS
+ preload rule in the Chromium browser. See
+ https://src.chromium.org/viewvc/chrome/trunk/src/net/base/transport_security_state.cc
+ for the list of preloads. Sites are added to the Chromium HSTS
+ preload list on request from their administrators, so HTTPS should
+ work properly everywhere on this site.
+
+ Because Chromium and derived browsers automatically force HTTPS for
+ every access to this site, this rule applies only to Firefox. -->
+<ruleset name="Googleplex.com (default off)" platform="firefox" default_off="Certificate error">
+ <target host="googleplex.com" />
+
+ <securecookie host="^googleplex\.com$" name=".+" />
+
+ <rule from="^http://googleplex\.com/" to="https://googleplex.com/" />
+</ruleset>
diff --git a/searx/https_rules/OpenStreetMap.xml b/searx/https_rules/OpenStreetMap.xml
new file mode 100644
index 000000000..58a661823
--- /dev/null
+++ b/searx/https_rules/OpenStreetMap.xml
@@ -0,0 +1,15 @@
+<ruleset name="OpenStreetMap">
+
+ <target host="openstreetmap.org"/>
+ <target host="*.openstreetmap.org"/>
+
+ <rule from="^http://(?:www\.)?openstreetmap\.org/"
+ to="https://www.openstreetmap.org/"/>
+
+ <rule from="^http://tile\.openstreetmap\.org/"
+ to="https://a.tile.openstreetmap.org/"/>
+
+ <rule from="^http://(blog|help|lists|nominatim|piwik|taginfo|[abc]\.tile|trac|wiki)\.openstreetmap\.org/"
+ to="https://$1.openstreetmap.org/"/>
+
+</ruleset>
diff --git a/searx/https_rules/Rawgithub.com.xml b/searx/https_rules/Rawgithub.com.xml
new file mode 100644
index 000000000..3868f332a
--- /dev/null
+++ b/searx/https_rules/Rawgithub.com.xml
@@ -0,0 +1,14 @@
+<!--
+ www: cert only matches ^rawgithub.com
+
+-->
+<ruleset name="rawgithub.com">
+
+ <target host="rawgithub.com" />
+ <target host="www.rawgithub.com" />
+
+
+ <rule from="^http://(?:www\.)?rawgithub\.com/"
+ to="https://rawgithub.com/" />
+
+</ruleset>
diff --git a/searx/https_rules/Soundcloud.xml b/searx/https_rules/Soundcloud.xml
new file mode 100644
index 000000000..0baa5832b
--- /dev/null
+++ b/searx/https_rules/Soundcloud.xml
@@ -0,0 +1,101 @@
+<!--
+
+ CDN buckets:
+
+ - akmedia-a.akamaihd.net
+
+ - soundcloud.assistly.com
+
+ - help.soundcloud.com
+
+ - cs70.wac.edgecastcdn.net
+
+ - a1.sndcdn.com
+ - i1.sndcdn.com
+ - w1.sndcdn.com
+
+ - wpc.658D.edgecastcdn.net
+ - m-a.sndcdn.com.edgesuite.net
+ - soundcloud.gettyimages.com
+
+ - scbackstage.wpengine.netdna-cdn.com
+
+ - ssl doesn't exist
+ - backstage.soundcloud.com
+
+ - soundcloud.wpengine.netdna-cdn.com
+
+ - -ssl doesn't exist
+ - blog.soundcloud.com
+
+ - gs1.wpc.v2cdn.netcdn.net
+ - gs1.wpc.v2cdn.net
+
+ - ec-media.soundcloud.com
+
+ Nonfunctional soundcloud.com subdomains:
+
+ - help (redirects to http, mismatched, CN: *.assistly.com)
+ - m (redirects to http)
+ - media
+ - status (times out)
+
+
+ Problematic domains:
+
+ - m-a.sndcdn.com (works, akamai)
+
+
+ Partially covered domains:
+
+ - backstage.soundcloud.com
+
+
+ Fully covered domains:
+
+ - sndcdn.com subdomains:
+
+ - a[12]
+ - api
+ - i[1-4]
+ - w[12]
+ - wis
+
+ - soundcloud.com subdomains:
+
+ - (www.)
+ - api
+ - blog
+ - connect
+ - developers
+ - ec-media
+ - eventlogger
+ - help-assets
+ - media
+ - visuals
+ - w
+
+-->
+<ruleset name="Soundcloud (partial)">
+
+ <target host="scbackstage.wpengine.netdna-cdn.com" />
+ <target host="soundcloud.wpengine.netdna-cdn.com" />
+ <target host="*.sndcdn.com" />
+ <target host="soundcloud.com" />
+ <target host="*.soundcloud.com" />
+ <exclusion pattern="^https?://(?:scbackstage\.wpengine\.netdna-cdn|backstage\.soundcloud)\.com/(?!wp-content/)" />
+
+
+ <rule from="^http://([aiw]\d|api|wis)\.sndcdn\.com/"
+ to="https://$1.sndcdn.com/" />
+
+ <rule from="^http://((?:api|backstage|blog|connect|developers|ec-media|eventlogger|help-assets|media|visuals|w|www)\.)?soundcloud\.com/"
+ to="https://$1soundcloud.com/" />
+
+ <rule from="^https?://scbackstage\.wpengine\.netdna-cdn\.com/"
+ to="https://backstage.soundcloud.com/" />
+
+ <rule from="^https?://soundcloud\.wpengine\.netdna-cdn\.com/"
+ to="https://blog.soundcloud.com/" />
+
+</ruleset>
diff --git a/searx/https_rules/ThePirateBay.xml b/searx/https_rules/ThePirateBay.xml
new file mode 100644
index 000000000..010387b6b
--- /dev/null
+++ b/searx/https_rules/ThePirateBay.xml
@@ -0,0 +1,36 @@
+<!--
+ Nonfunctional:
+
+ - image.bayimg.com
+ - (www.)thepiratebay.sx (http reply)
+
+
+ For problematic rules, see ThePirateBay-mismatches.xml.
+
+-->
+<ruleset name="The Pirate Bay (partial)">
+
+ <target host="suprbay.org" />
+ <target host="*.suprbay.org" />
+ <!-- * for cross-domain cookie -->
+ <target host="*.forum.suprbay.org" />
+ <target host="thepiratebay.org"/>
+ <target host="*.thepiratebay.org"/>
+ <target host="thepiratebay.se"/>
+ <target host="*.thepiratebay.se"/>
+
+ <securecookie host="^.*\.suprbay\.org$" name=".*" />
+ <securecookie host="^(.*\.)?thepiratebay\.se$" name=".*"/>
+
+
+ <!-- Cert doesn't match (www.), redirects like so. -->
+ <rule from="^https?://(?:forum\.|www\.)?suprbay\.org/"
+ to="https://forum.suprbay.org/" />
+
+ <rule from="^http://(?:www\.)?thepiratebay\.(?:org|se)/"
+ to="https://thepiratebay.se/"/>
+
+ <rule from="^http://(rss|static|torrents)\.thepiratebay\.(?:org|se)/"
+ to="https://$1.thepiratebay.se/"/>
+
+</ruleset>
diff --git a/searx/https_rules/Torproject.xml b/searx/https_rules/Torproject.xml
new file mode 100644
index 000000000..69269af7e
--- /dev/null
+++ b/searx/https_rules/Torproject.xml
@@ -0,0 +1,18 @@
+<ruleset name="Tor Project">
+
+ <target host="torproject.org" />
+ <target host="*.torproject.org" />
+ <exclusion pattern="^http://torperf\.torproject\.org/" />
+
+
+ <!-- Not secured by server:
+ -->
+ <!--securecookie host="^\.blog\.torproject\.org$" name="^SESS[0-9a-f]{32}$" /-->
+
+ <securecookie host="^(?:.*\.)?torproject\.org$" name=".+" />
+
+
+ <rule from="^http://([^/:@\.]+\.)?torproject\.org/"
+ to="https://$1torproject.org/" />
+
+</ruleset>
diff --git a/searx/https_rules/Twitter.xml b/searx/https_rules/Twitter.xml
new file mode 100644
index 000000000..3285f44e0
--- /dev/null
+++ b/searx/https_rules/Twitter.xml
@@ -0,0 +1,169 @@
+<!--
+ Other Twitter rulesets:
+
+ - Twitter_Community.com.xml
+
+
+ Nonfunctional domains:
+
+ - status.twitter.com *
+ - status.twitter.jp *
+
+ * Tumblr
+
+
+ CDN buckets:
+
+ - a1095.g.akamai.net/=/1095/134446/1d/platform.twitter.com/ | platform2.twitter.com.edgesuite.net
+
+ - platform2.twitter.com
+
+ - twitter-any.s3.amazonaws.com
+ - twitter-blog.s3.amazonaws.com
+
+ - d2rdfnizen5apl.cloudfront.net
+
+ - s.twimg.com
+
+ - ssl2.twitter.com.edgekey.net
+ - twitter.github.com
+
+
+ Problematic domains:
+
+ - twimg.com subdomains:
+
+ - a5 *
+ - s (cloudfront)
+
+ - twitter.com subdomains:
+
+ - platform[0-3] (403, akamai)
+
+ * akamai
+
+
+ Fully covered domains:
+
+ - (www.)t.co (www → ^)
+
+ - twimg.com subdomains:
+
+ - a[5-9] (→ si0)
+ - a\d
+ - abs
+ - dnt
+ - ea
+ - g
+ - g2
+ - gu
+ - hca
+ - jp
+ - ma
+ - ma[0123]
+ - o
+ - p
+ - pbs
+ - r
+ - s (→ d2rdfnizen5apl.cloudfront.net)
+ - si[0-5]
+ - syndication
+ - cdn.syndication
+ - tailfeather
+ - ton
+ - v
+ - widgets
+
+ - twitter.com subdomains:
+
+ - (www.)
+ - 201[012]
+ - about
+ - ads
+ - analytics
+ - api
+ - cdn.api
+ - urls.api
+ - blog
+ - business
+ - preview.cdn
+ - preview-dev.cdn
+ - preview-stage.cdn
+ - de
+ - dev
+ - en
+ - engineering
+ - es
+ - firefox
+ - fr
+ - it
+ - ja
+ - jp
+ - m
+ - media
+ - mobile
+ - music
+ - oauth
+ - p
+ - pic
+ - platform
+ - platform[0-3] (→ platform)
+ - widgets.platform
+ - search
+ - static
+ - support
+ - transparency
+ - upload
+
+
+ These altnames don't exist:
+
+ - i3.twimg.com
+ - p-dev.twimg.com
+ - vmtc.twimg.com
+
+ - cdn-dev.api.twitter.com
+
+-->
+<ruleset name="Twitter">
+
+ <target host="t.co" />
+ <target host="*.t.co" />
+ <target host="*.twimg.com" />
+ <target host="twitter.com" />
+ <target host="*.twitter.com" />
+
+
+ <!-- Secured by server:
+ -->
+ <!--securecookie host="^\.twitter\.com$" name="^_twitter_sess$" /-->
+ <!--securecookie host="^support\.twitter\.com$" name="^_help_center_session$" /-->
+ <!--
+ Not secured by server:
+ -->
+ <!--securecookie host="^\.t\.co$" name="^muc$" /-->
+ <!--securecookie host="^\.twitter\.com$" name="^guest_id$" /-->
+
+ <securecookie host="^\.t\.co$" name=".+" />
+ <securecookie host="^(?:.*\.)?twitter\.com$" name=".+" />
+
+
+ <rule from="^http://(?:www\.)?t\.co/"
+ to="https://t.co/" />
+
+ <rule from="^http://a[5-9]\.twimg\.com/"
+ to="https://si0.twimg.com/" />
+
+ <rule from="^http://(abs|a\d|dnt|ea|g[2u]?|hca|jp|ma\d?|o|p|pbs|r|si\d|(?:cdn\.)?syndication|tailfeather|ton|v|widgets)\.twimg\.com/"
+ to="https://$1.twimg.com/" />
+
+ <rule from="^http://s\.twimg\.com/"
+ to="https://d2rdfnizen5apl.cloudfront.net/" />
+
+ <rule from="^http://((?:201\d|about|ads|analytics|blog|(?:cdn\.|urls\.)?api|business|preview(?:-dev|-stage)?\.cdn|de|dev|engineering|en|es|firefox|fr|it|ja|jp|m|media|mobile|music|oauth|p|pic|platform|widgets\.platform|search|static|support|transparency|upload|www)\.)?twitter\.com/"
+ to="https://$1twitter.com/" />
+
+ <rule from="^http://platform\d\.twitter\.com/"
+ to="https://platform.twitter.com/" />
+
+</ruleset>
diff --git a/searx/https_rules/Vimeo.xml b/searx/https_rules/Vimeo.xml
new file mode 100644
index 000000000..f2a3e5764
--- /dev/null
+++ b/searx/https_rules/Vimeo.xml
@@ -0,0 +1,75 @@
+<!--
+ CDN buckets:
+
+ - av.vimeo.com.edgesuite.net
+
+ - a808.g.akamai.net
+
+ - pdl.vimeocdn.com.edgesuite.net
+
+ - a1189.g.akamai.net
+
+
+ Problematic subdomains:
+
+ - av (pdl.../crossdomain.xml restricts to port 80)
+ - pdl (works, akamai)
+
+
+ Partially covered subdomains:
+
+ - developer (some pages redirect to http)
+ - pdl (→ akamai)
+
+
+ Fully covered subdomains:
+
+ - (www.)
+ - secure
+
+
+Default off per https://trac.torproject.org/projects/tor/ticket/7569 -->
+<ruleset name="Vimeo (default off)" default_off="breaks some video embedding">
+
+ <target host="vimeo.com" />
+ <target host="*.vimeo.com" />
+ <exclusion pattern="^http://av\.vimeo\.com/crossdomain\.xml" />
+ <!--exclusion pattern="^http://developer\.vimeo\.com/($|\?|(apps|guidelines|help|player)($|[?/]))" /-->
+ <exclusion pattern="^http://developer\.vimeo\.com/(?!apis(?:$|[?/])|favicon\.ico)" />
+ <target host="*.vimeocdn.com" />
+ <!--
+ Uses crossdomain.xml from s3.amazonaws.com, which sets secure="false"
+
+ https://mail1.eff.org/pipermail/https-everywhere/2012-October/001583.html
+ -->
+ <exclusion pattern="^http://a\.vimeocdn\.com/p/flash/moogaloop/" />
+
+ <!-- We cannot secure streams because crossdomain.xml
+ restricts to port 80 :(
+ -->
+ <exclusion pattern="^http://pdl\.vimeocdn\.com/(?!crossdomain\.xml)" />
+
+
+ <!-- Tracking cookies:
+ -->
+ <securecookie host="^\.(?:player\.)?vimeo\.com$" name="^__utm\w$" />
+
+
+ <rule from="^http://((?:developer|player|secure|www)\.)?vimeo\.com/"
+ to="https://$1vimeo.com/" />
+
+ <rule from="^http://av\.vimeo\.com/"
+ to="https://a248.e.akamai.net/f/808/9207/8m/av.vimeo.com/" />
+
+ <!-- a & b: Akamai -->
+ <rule from="^http://(?:secure-)?([ab])\.vimeocdn\.com/"
+ to="https://secure-$1.vimeocdn.com/" />
+
+ <rule from="^http://i\.vimeocdn\.com/"
+ to="https://i.vimeocdn.com/" />
+
+ <rule from="^http://pdl\.vimeocdn\.com/"
+ to="https://a248.e.akamai.net/f/1189/4415/8d/pdl.vimeocdn.com/" />
+
+</ruleset>
+
diff --git a/searx/https_rules/WikiLeaks.xml b/searx/https_rules/WikiLeaks.xml
new file mode 100644
index 000000000..977709d2d
--- /dev/null
+++ b/searx/https_rules/WikiLeaks.xml
@@ -0,0 +1,13 @@
+<ruleset name="WikiLeaks">
+
+ <target host="wikileaks.org" />
+ <target host="*.wikileaks.org" />
+
+
+ <securecookie host="^(?:w*\.)?wikileaks\.org$" name=".+" />
+
+
+ <rule from="^http://((?:chat|search|shop|www)\.)?wikileaks\.org/"
+ to="https://$1wikileaks.org/" />
+
+</ruleset> \ No newline at end of file
diff --git a/searx/https_rules/Wikimedia.xml b/searx/https_rules/Wikimedia.xml
new file mode 100644
index 000000000..9f25831a2
--- /dev/null
+++ b/searx/https_rules/Wikimedia.xml
@@ -0,0 +1,107 @@
+<!--
+ Wikipedia and other Wikimedia Foundation wikis previously had no real HTTPS support, and
+ URLs had to be rewritten to https://secure.wikimedia.org/$wikitype/$language/ . This is no
+ longer the case, see https://blog.wikimedia.org/2011/10/03/native-https-support-enabled-for-all-wikimedia-foundation-wikis/ ,
+ so this file is a lot simpler these days.
+
+
+ Mixed content:
+
+ - Images, on:
+
+ - stats.wikimedia.org from upload.wikimedia.org *
+ - stats.wikimedia.org from wikimediafoundation.org *
+
+ * Secured by us
+
+-->
+<ruleset name="Wikimedia">
+
+ <target host="enwp.org" />
+ <target host="frwp.org" />
+
+ <target host="mediawiki.org" />
+ <target host="www.mediawiki.org" />
+ <target host="wikimedia.org" />
+ <target host="*.wikimedia.org" />
+ <exclusion pattern="^http://(?:apt|cs|cz|parsoid-lb\.eqiad|status|torrus|ubuntu)\.wikimedia\.org" />
+ <!-- https://mail1.eff.org/pipermail/https-everywhere-rules/2012-June/001189.html -->
+ <exclusion pattern="^http://lists\.wikimedia\.org/pipermail(?:$|/)" />
+ <target host="wikimediafoundation.org" />
+ <target host="www.wikimediafoundation.org" />
+
+ <!-- Wikimedia projects (also some wikimedia.org subdomains) -->
+ <target host="wikibooks.org" />
+ <target host="*.wikibooks.org" />
+ <target host="wikidata.org" />
+ <target host="*.wikidata.org" />
+ <target host="wikinews.org" />
+ <target host="*.wikinews.org" />
+ <target host="wikipedia.org" />
+ <target host="*.wikipedia.org" />
+ <target host="wikiquote.org" />
+ <target host="*.wikiquote.org" />
+ <target host="wikisource.org" />
+ <target host="*.wikisource.org" />
+ <target host="wikiversity.org" />
+ <target host="*.wikiversity.org" />
+ <target host="wikivoyage.org" />
+ <target host="*.wikivoyage.org" />
+ <target host="wiktionary.org" />
+ <target host="*.wiktionary.org" />
+
+ <!-- Wikimedia chapters -->
+ <target host="wikimedia.ca" />
+ <target host="www.wikimedia.ca" />
+
+ <!-- Wikimedia Tool Labs -->
+ <target host="tools.wmflabs.org" />
+ <target host="icinga.wmflabs.org" />
+ <target host="ganglia.wmflabs.org" />
+
+ <!-- Not secured by server:
+ -->
+ <!--securecookie host="^\.wiki(books|ipedia)\.org$" name="^GeoIP$" /-->
+
+ <securecookie host="^^\.wik(?:ibooks|idata|imedia|inews|ipedia|iquote|isource|iversity|ivoyage|tionary)\.org$" name="^GeoIP$" />
+ <securecookie host="^([^@:/]+\.)?wik(ibooks|idata|inews|ipedia|iquote|isource|iversity|ivoyage|tionary)\.org$" name=".*" />
+ <securecookie host="^(species|commons|meta|incubator|wikitech).wikimedia.org$" name=".*" />
+ <securecookie host="^(?:www\.)?mediawiki\.org$" name=".*" />
+ <securecookie host="^wikimediafoundation.org$" name=".*" />
+
+ <rule from="^http://(en|fr)wp\.org/"
+ to="https://$1.wikipedia.org/wiki/" />
+
+ <rule from="^http://(?:www\.)?mediawiki\.org/"
+ to="https://www.mediawiki.org/" />
+
+ <rule from="^https?://download\.wikipedia\.org/"
+ to="https://dumps.wikimedia.org/" />
+
+ <rule from="^https?://(download|dataset2|sitemap)\.wikimedia\.org/"
+ to="https://dumps.wikimedia.org/" />
+
+ <rule from="^https?://(labs-ns[01]|virt0)\.wikimedia\.org/"
+ to="https://wikitech.wikimedia.org/" />
+
+ <rule from="^https?://noboard\.chapters\.wikimedia\.org/"
+ to="https://noboard-chapters.wikimedia.org/" />
+
+ <rule from="^https?://wg\.en\.wikipedia\.org/"
+ to="https://wg-en.wikipedia.org/" />
+
+ <rule from="^https?://arbcom\.(de|en|fi|nl)\.wikipedia\.org/"
+ to="https://arbcom-$1.wikipedia.org/" />
+
+ <rule from="^http://([^@:/]+\.)?wik(ibooks|idata|imedia|inews|ipedia|iquote|isource|iversity|ivoyage|tionary)\.org/"
+ to="https://$1wik$2.org/" />
+
+ <rule from="^http://(www\.)?wikimediafoundation\.org/"
+ to="https://$1wikimediafoundation.org/" />
+
+ <rule from="^http://(www\.)?wikimedia\.ca/"
+ to="https://wikimedia.ca/" />
+
+ <rule from="^http://([^@:/]+)\.wmflabs\.org/"
+ to="https://$1.wmflabs.org/" />
+</ruleset>
diff --git a/searx/https_rules/Yahoo.xml b/searx/https_rules/Yahoo.xml
new file mode 100644
index 000000000..33548c4ab
--- /dev/null
+++ b/searx/https_rules/Yahoo.xml
@@ -0,0 +1,2450 @@
+<!--
+ Other Yahoo rulesets:
+
+ - Flickr.xml
+ - Lexity.com.xml
+ - Right-Media.xml
+ - Yahoo.com.tw.xml
+ - Yahoo.net.xml
+ - Yahoo_APIs.xml
+ - Yahoo_Japan.xml
+ - Yho.com.xml
+ - Yimg.com.xml
+ - YUI_Library.xml
+
+
+ CDN buckets:
+
+ - ipgcdn-a.akamaihd.net
+ - yahootv.flyingfishes.com.br
+ - yahoosports.teamfanshop.com
+
+
+ Nonfunctional domains:
+
+ - yahoo.com subdomains:
+
+ - account ⁵
+ - cn.adspecs ¹
+ - tw.adspecs ¹
+ - alerts ¹
+
+ - co.astrology ⁵
+ - espanol.astrology ⁵
+ - mx.astrology ⁵
+
+ - auction ¹
+
+ - biz subdomains:
+
+ - au.rss ¹
+ - nz.rss ¹
+
+ - bookmarks ⁵
+ - buzz ¹
+
+ - cn subdomains:
+
+ - ^ ¹
+ - help ¹
+ - news ¹
+
+ - docs subdomains:
+
+ - ^ ⁵
+ - ar ⁵
+ - fr ⁵
+ - uk ⁵
+
+ - au.rss.food (403, valid cert)
+ - au.forums ¹
+ - ar.games ⁵
+ - help.cc.hk ⁵
+ - hsrd ¹
+ - labs ¹
+
+ - lifestyle subdomains:
+
+ - tw.ipeen ¹
+ - au.rss ³
+ - nz.rss ³
+ - tw ⁵
+
+ - cn.overview.mail ¹
+
+ - cf.maps (404; mismatched, CN: www.yahoo.com)
+ - gws2.maps ¹
+ - kr.mobile ⁵
+ - tw.music ⁵
+
+ - my subdomains:
+
+ - ar ⁵
+ - au ²
+ - br ²
+ - ca ²
+ - de ²
+ - es ²
+ - fr ²
+ - hk ²
+ - ie ¹
+ - in ²
+ - it ²
+ - kr ¹
+ - mx ²
+ - nz ²
+ - qc ²
+ - sg ²
+ - tw ²
+ - cm.tw ⁸
+ - uk ²
+
+ - \w\w.news:
+
+ - cn ¹
+ - kr ¹
+ - se ¹
+
+ - opi ¹
+ - au.pfinance ²
+ - ar.rd ¹
+ - research ¹
+ - rightmedia (shows speakers.watersmartinnovations.com; mismatched, CN: *.watersmartinnovations.com)
+
+ - search subdomains:
+
+ - us.recipes ¹
+ - gossip-ss.us ¹
+
+ - \w\w.yhs:
+
+ - ar ¹
+ - au ¹
+ - br ¹
+ - ca ¹
+ - de ¹
+ - es ¹
+ - fr ¹
+ - hk ¹
+ - in ¹
+ - it ¹
+ - kr ¹
+ - mx ¹
+ - my ¹
+ - nz ¹
+ - ph ¹
+ - se ¹
+ - sg ¹
+ - tw ¹
+ - uk ¹
+ - us ¹
+ - vn ¹
+
+ - searchmarketing ¹
+ - au.shopping ⁹
+ - es.shopping ⁵
+ - suggestions ⁵
+ - au.rss.thehype ³
+
+ - video subdomains:
+
+ - malaysia ¹
+ - my ¹
+ - ph ¹
+ - sg ¹
+ - tw ¹
+
+ - voices ⁵
+ - cn.weather ¹
+ - visit.webhosting ⁵
+ - count.yisou ¹
+
+ - youth subdomains:
+
+ - au.rss ³
+ - nz.rss ³
+
+ - ypolicyblog.com (reset)
+ - www.ypolicyblog.com
+
+ ¹ Refused
+ ² Redirects to http, valid cert
+ ³ 404, valid cert
+ ⁴ Redirects to http; mismatched, CN: www.yahoo.com
+ ⁵ Dropped
+ ⁶ Recursive redirect
+ ⁷ 404; mismatched, CN: *.news.yahoo.com
+ ⁸ Redirects to http; mismatched, CN: *.news.yahoo.com
+ ⁹ "Incorrect Host in URL"
+
+ Problematic domains:
+
+ - i.acdn.us ¹
+ - cm.npc-morris.overture.com ²
+ - cm.npc-nydn.overture.com ²
+ - totaltravel.co.uk ³
+ - www.totaltravel.co.uk ⁴
+ - totaltravel.com ³
+ - www.totaltravel.com ⁴
+
+ yahoo.com subdomains:
+
+ - fr.actualites ⁴
+ - advertisingcentral ⁴
+
+ - cl.answers ⁴
+ - co.answers ⁴
+ - pe.answers ⁴
+ - ve.answers ⁴
+
+ - au.astrology ⁷
+ - ca.astrology ⁴
+ - nz.astrology ⁷
+
+ - ar.autos ⁴
+ - de.autos ⁴
+ - fr.autos ⁴
+ - mx.autos ⁴
+
+ - axis ¹
+ - id.berita ⁵
+
+ - au.biz ⁷
+ - nz.biz ⁷
+
+ - \w\w.careers: (works; mismatched, CN: www.yahoo.com)
+
+ - au
+ - ca
+ - de
+ - fr
+ - hk
+ - id
+ - ie
+ - in
+ - it
+ - jp
+ - my
+ - no
+ - ph
+ - qc ¹
+ - sg
+ - tw
+ - uk
+ - us
+ - vn
+
+ - malaysia.careers ¹
+ - cars ¹
+ - tw.help.cc ¹
+ - cine ¹
+ - cn (reset)
+ - connectedtv (works; mismatched, CN: smarttv.yahoo.com)
+ - cl.deportes ⁴
+ - co.deportes ⁴
+ - es.deportes ⁴
+ - pe.deportes ⁴
+ - ve.deportes ⁴
+ - au.dir ⁷
+ - au.docs (works; mismatched, CN: *.yahoo7.com.au)
+ - hk.ent ⁴
+ - br.esportes ⁴
+ - es.everything ⁴
+ - fr.eurosport ⁴
+ - fr.divertissement ⁵
+ - dk ⁴
+ - fantasysports ⁴
+ - es.laliga.fantasysports ⁴
+ - tw.fashion ⁵
+ - feedback ⁴
+ - chart.finance ⁴
+ - ichart.finance ⁴
+ - ie.finance ⁴
+ - kr.finance (404, valid cert)
+ - au.food (403; mismatched, CN: *.yahoo7.com.au)
+ - nz.food (403; mismatched, CN: *.yahoo7.com.au)
+ - au.forums ⁷
+
+ - games subdomains:
+
+ - br ⁴
+ - de ⁴
+ - es ⁴
+ - fr ⁴
+ - id ⁴
+ - it ⁴
+ - malaysia ⁴
+ - nz ⁴
+ - ph ⁴
+
+ - it.giochi ⁵
+ - ie.groups ⁴
+ - kr.gugi ⁴
+ - au.gwn7 (mixed css from l.yimg.com)
+ - fr.help ⁴
+ - help.cc.hk ⁴
+ - fr.jeux ⁵
+ - es.juegos ⁵
+ - kr ⁴
+
+ - lifestyle subdomains:
+
+ - ar ⁴
+ - br ⁴
+ - ca ⁴
+ - es ⁴
+ - es-us ⁴
+ - fr ⁴
+ - ie ⁴
+ - it ⁴
+
+ - ca.local (dropped, redirect destination cert mismatched)
+ - fr.local ⁴
+ - es.maps ⁴
+ - in.maps ⁴
+ - kr.maps ⁴
+ - mx.maps ⁴
+ - nz.maps ⁴
+
+ - external.global.media ⁵
+ - au.messages ⁷
+ - ie.messenger ⁴
+ - nz.messenger ⁷
+ - tw.messenger ⁴
+ - dk.mobile ⁴
+ - ie.mobile ⁴
+ - no.mobile ⁴
+ - webservices.mobile (works, self-signed)
+ - tw.atm.money (works; mismatched, CN: tw.campaign.money.yahoo.com)
+
+ - br.movies ¹
+ - fr.movies ¹
+ - es.movies ⁴
+ - es-us.movies ⁴
+ - it.movies ⁴
+
+ - br.mulher ⁵
+ - hk.music ¹
+ - tw.music ⁵
+ - fr.musique ⁵
+
+ - news subdomains:
+
+ - ar ⁴
+ - br ⁴
+ - cl ⁴
+ - co ⁴
+ - de ⁴
+ - dk ⁴
+ - id ⁴
+ - ie ⁴
+ - it ⁴
+ - mx ⁴
+ - pe ⁴
+ - qc ⁴
+ - au.rss (mixed css from l.yimg.com)
+ - ve ⁴
+
+ - no ⁴
+ - notepad (works; mismatched, CN: *.calendar.yahoo.com)
+ - it.notizie ⁵
+
+ - on ⁴
+ - it.oroscopo ⁵
+ - fr.pourelles ⁵
+ - br.esporteinterativo ⁵
+ - id.olahraga ⁵
+ - au.prime7 (mixed css from l.yimg.com)
+ - ru ⁴
+
+ - safely subdomains: ⁴
+
+ - ar
+ - br
+ - cl
+ - es
+ - es-us
+ - malaysia
+ - pe
+ - ve
+ - vn
+
+ - cn.search ⁴
+ - my.images.search ⁴
+ - kr.images.search ⁴
+ - nz.maps.search ⁴
+ - my.search ⁴
+ - my.video.search ⁴
+ - kr.searchad ¹
+
+ - ph.she ⁵
+ - fr.sites ⁵
+
+ - de.solutions ¹
+ - es.solutions ¹
+ - fr.solutions ¹
+ - it.solutions ¹
+ - nz.solutions ⁷
+ - uk.solutions ¹
+
+ - sport ⁴
+
+ - sports subdomains:
+
+ - ar ⁴
+ - br ⁴
+ - de ⁴
+ - es ⁴
+ - id ⁴
+ - in ⁴
+ - uk ⁴
+
+ - br.tempo ⁵
+ - es.tendencias ⁵
+ - au.todaytonight (403, valid cert)
+
+ - au.travel ⁷
+ - ca.travel ⁴
+ - id.travel ⁴
+ - my.travel ⁴
+ - nz.travel ⁷
+ - ph.travel ⁴
+ - uk.travel ⁴
+ - ca.tv ⁴
+ - pe.tv ⁴
+
+ - video subdomains:
+
+ - ^ ⁴
+ - ar ⁴
+ - au ⁴
+ - br ⁴
+ - ca ⁴
+ - co ⁴
+ - de ⁴
+ - es ⁴
+ - es-us ⁴
+ - fr ⁴
+ - hk ⁴
+ - in ⁴
+ - it ⁴
+ - pe ⁴
+ - mx ⁴
+ - uk ⁴
+ - ve ⁴
+
+ - fr.voyage (works; expired 2013-01-08, mismatched, CN: uk.travel.yahoo.com)
+
+ - weather subdomains:
+
+ - ar ⁴
+ - au ⁴
+ - br ⁴
+ - cl ⁴
+ - co ⁴
+ - de ⁴
+ - es ⁴
+ - espanol ⁴
+ - fr ⁴
+ - it ⁴
+ - kr ⁴
+ - mx ⁴
+ - pe ⁴
+ - tw ⁴
+ - mx ⁴
+ - ve ⁴
+
+ - widgets (works; mismatched, CN: smarttv.yahoo.com)
+ - au.youth (works; mismatched, CN: yahoo.com.au)
+
+
+ - (www.)yhoo.it ⁴ (bit.ly alias)
+
+ ¹ Dropped
+ ² Works, mismatched, CN: *.ysm.yahoo.com
+ ³ Works; mismatched, CN: builder.totaltravel.com
+ ⁴ Refused
+ ⁵ Works; mismatched, CN: *.news.yahoo.com
+ ⁶ Works; mismatched, CN: address.yahoo.com
+ ⁷ "Incorrect Host in URL"
+
+
+ Partially covered domains:
+
+ - (www.)totaltravel.com (→ au.totaltravel.yahoo.com, haven't found images/)
+
+ - yahoo.com subdomains:
+
+ - advertisingcentral ¹ (→ advertising)
+ - fantasysports ¹ (-> sports)
+ - in.sports (→ cricket, /*(?!$) doesn't redirect)
+ - nz.video (→ nz.news, \w.* 404s)
+
+ ¹ Some paths other than root don't redirect
+ ⁵ Avoiding false/broken MCB
+
+
+ Fully covered domains:
+
+ - i.acdn.us (→ s.yimg.com/ck/)
+
+ - (www.)totaltravel.co.uk (→ au.totaltravel.yahoo.com)
+
+ - yahoo.com subdomains:
+
+ - (www.)
+
+ - \w\w:
+
+ - ar
+ - au
+ - br
+ - ca
+ - cl
+ - cn (→ sg)
+ - co
+ - de
+ - dk (→ www)
+ - e1 (→ espanol)
+ - es
+ - fr
+ - gr
+ - hk
+ - id
+ - ie
+ - in
+ - it
+ - kr (→ tools.search)
+ - mx
+ - no (→ www)
+ - nz
+ - pe
+ - ph
+ - qc
+ - ru (→ www)
+ - se
+ - sg
+ - tw
+ - ve
+ - vn
+ - uk
+ - us
+
+ - fr.actualites (→ fr.news)
+ - fr-ca.actualites
+ - address
+
+ - \w\w.address:
+
+ - ca
+ - e1
+ - fr
+ - hk
+ - nz
+
+ - admanager
+
+ - \w\w.adserver:
+
+ - au
+ - uk
+ - us
+
+ - global.adserver
+ - adspecs
+
+ - \w+.adspecs:
+
+ - au
+ - de
+ - es
+ - fr
+ - hk
+ - in
+ - it
+ - latam
+ - nz
+ - sea
+ - uk
+
+ - \w+.adspecs-new:
+
+ - in
+ - sea
+
+ - advertising
+
+ - \w\w.advertising:
+
+ - au
+ - ca
+ - fr
+ - nz
+
+ - beap.adx
+ - c5.ah
+ - c5a.ah
+ - cookex.amp
+ - s-cookex.amp
+
+ - analytics subdomains:
+
+ - [aoyz]
+ - apac
+ - y3
+
+ - anc
+ - answers
+
+ - \w\w.answers:
+
+ - ar
+ - au
+ - br
+ - ca
+ - cl (→ espanol.answers)
+ - co (→ espanol.answers)
+ - de
+ - es
+ - fr
+ - id
+ - in
+ - it
+ - mx
+ - nz
+ - pe (→ espanol.answers)
+ - ph
+ - qc
+ - sg
+ - uk
+ - ve (→ espanol.answers)
+ - vn
+
+ - espanol.answers
+ - malaysia.answers
+
+ - antispam
+
+ - \w\w.antispam:
+
+ - ca
+ - dk
+ - fr
+ - in
+
+ - vn.antoan
+ - au.apps
+ - global.ard
+
+ - \w\w.astrology:
+
+ - au (→ au.lifestyle)
+ - ca (→ ca.shine)
+ - es
+ - fr
+ - nz (→ nz.lifestyle)
+ - uk
+
+ - auctions subdomains:
+
+ - hk
+ - hk.info
+ - hk.f1.master
+ - hk.f1.page
+ - hk.search
+ - hk.store
+ - hk.edit.store
+ - hk.user
+
+ - autos
+
+ - \w\w.autos:
+
+ - ca
+ - ar (→ ar.autocosmos.yahoo.net)
+ - de (→ de.cars)
+ - fr (→ fr.cars)
+ - mx (→ mx.autocosmos.yahoo.net)
+ - tw
+
+ - bc subdomains:
+
+ - clicks.beap
+ - csc.beap
+ - pn1
+ - row
+ - us
+
+ - axis (→ www)
+ - ar.ayuda
+
+ - bid subdomains:
+
+ - tw.campaign
+ - tw.master
+ - tw.mb
+ - tw.page
+ - tw.search
+ - tw.store
+ - tw
+ - tw.user
+
+ - tw.bigdeals
+ - m.tw.bigdeals
+ - tw.billing
+ - biz
+ - au.biz (→ au.finance)
+ - nz.biz (→ nz.finance)
+ - boss
+ - tw.partner.buy
+ - tw.buy
+ - calendar
+
+ - \w\w.calendar:
+
+ - ar
+ - au
+ - br
+ - ca
+ - de
+ - dk
+ - es
+ - fr
+ - gr
+ - hk
+ - ie
+ - in
+ - it
+ - no
+ - nz
+ - se
+ - sg
+ - tw
+ - uk
+ - us
+
+ - careers
+
+ - \w\w.careers (→ careers)
+
+ - ar
+ - au
+ - br
+ - ca
+ - cl
+ - de
+ - fr
+ - es
+ - hk
+ - id
+ - ie
+ - in
+ - it
+ - jp
+ - mx
+ - my
+ - no
+ - ph
+ - qc
+ - nz
+ - sg
+ - tw
+ - uk
+ - us
+ - vn
+
+ - malaysia.careers (→ careers)
+
+ - cars (→ autos)
+
+ - \w\w.cars:
+
+ - de
+ - es
+ - fr
+ - it
+ - uk
+
+ - \w\w.celebridades:
+
+ - ar
+ - br
+ - co
+ - mx
+
+ - es-us.celebridades
+
+ - celebrity
+
+ - \w\w.celebrity:
+
+ - ca
+ - es
+ - gr
+ - id
+ - in
+ - it
+ - hk
+ - ph
+ - tw
+ - uk
+
+ - tw.help.cc (→ help)
+ - tw.charity
+ - chart
+ - cine (→ es-us.cine)
+
+ - \w\w.cine:
+
+ - cl
+ - co
+ - es
+ - mx
+ - pe
+ - ve
+
+ - es-us.cine
+
+ - \w\w.cinema:
+
+ - br
+ - fr
+ - it
+
+ - \w\w.clima:
+
+ - cl
+ - co
+ - mx
+ - pe
+ - ve
+
+ - es-us.clima
+ - migration.cn
+ - commercecentral
+ - developers.commercecentral
+ - connectedtv (→ smarttv)
+ - br.contribuidores
+ - contributor
+ - uk.contributor
+ - cricket
+ - au.dating
+
+ - \w\w.deportes:
+
+ - ar
+ - cl (→ es-us.deportes)
+ - co (→ es-us.deportes)
+ - es (→ es.eurosport)
+ - mx
+ - pe (→ pe-us.deportes)
+ - ve (→ ve-us.deportes)
+
+ - es-us.deportes
+ - developer
+ - tw.dictionary
+ - dir
+ - au.dir (→ au.search)
+ - downloads
+ - s-b.dp
+
+ - edit subdomains:
+
+ - ^
+ - eu
+ - na
+ - sa
+ - tw
+
+ - tw.emarketing
+ - tw.ysm.emarketing
+ - en-maktoob
+ - hk.ent (→ hk.celebrity)
+
+ - \w\w.entertainment:
+
+ - my
+ - nz
+
+ - espanol
+ - edit.europe
+ - java.europe (→ adgallery.zenfs.com)
+
+ - eurosport subdomains:
+
+ - ^
+ - de
+ - es
+ - fr (→ fr.sports)
+ - it
+ - uk
+
+ - everything
+
+ - \w\w.everything:
+
+ - ca
+ - es (→ es.todo)
+ - nz
+ - ph
+ - pt
+ - tw
+ - uk
+
+ - au.fango
+
+ - \w+.fantasysports:
+
+ - baseball
+ - football
+ - golf
+ - hockey
+ - racing
+
+ - es.laliga.fantasysports (→ es.eurosport)
+ - tw.fashion
+ - feedback (→ yahoo.uservoice.com)
+ - br.financas
+ - finance
+
+ - \w\w.finance:
+
+ - ar
+ - au
+ - br
+ - ca
+ - de
+ - es
+ - fr
+ - hk
+ - ie (→ uk.finance)
+ - in
+ - it
+ - kr (→ tools.search)
+ - mx
+ - nz
+ - sg
+ - tw
+ - uk
+
+ - chart.finance (→ chart)
+ - tw.chart.finance
+ - espanol.finance
+ - tw.futures.finance
+ - ichart.finance (→ ichart)
+ - streamerapi.finance
+
+ - \w\w.finanzas:
+
+ - ar
+ - mx
+
+ - es-us.finanzas
+
+ - food subdomains:
+
+ - au (→ au.lifestyle)
+ - nz (→ nz.lifestyle)
+ - nz.rss
+
+ - au.forums (→ au.answers)
+ - nz.forums
+
+ - games subdomains:
+
+ - ^
+ - au
+ - ca
+ - de (→ de.spiele)
+ - id (→ games)
+ - malaysia (→ games)
+ - nz.games (→ games)
+ - ph (→ games)
+ - uk
+
+ - geo
+ - gma
+ - groups
+
+ - \w\w.groups:
+
+ - ar
+ - au
+ - br
+ - ca
+ - de
+ - dk
+ - es
+ - fr
+ - hk
+ - ie (→ uk.groups)
+ - in
+ - it
+ - kr
+ - mx
+ - nz
+ - ph
+ - sg
+ - tw
+ - uk
+ - us
+
+ - asia.groups
+ - espanol.groups
+ - es-us.groups
+ - fr-ca.groups
+ - moderators.groups
+ - kr.gugi (→ tools.search)
+ - health
+ - help
+
+ - \w\w.help:
+
+ - au
+ - br
+ - ca
+ - dk
+ - fr (→ help)
+ - hk
+ - io
+ - tw
+ - uk
+
+ - secure.help
+ - help.cc.hk (→ help)
+ - homes
+ - tw.house
+ - tw.v2.house
+ - ichart
+ - info
+
+ - \w\w.info:
+
+ - tw
+
+ - tw.tool.ks
+ - au.launch
+ - legalredirect
+
+ - \w\w.lifestyle:
+
+ - ar (→ ar.mujer)
+ - au
+ - ca (→ ca.shine)
+ - de
+ - hk
+ - ie (→ uk.lifestyle)
+ - in
+ - it
+ - mx (→ mx.mujer)
+ - nz
+ - uk
+
+ - es-us.lifestyle (→ ar.mujer)
+ - login
+ - gh.bouncer.login
+ - us.lrd
+ - local
+
+ - \w\w.local:
+
+ - au
+ - de
+ - fr (→ fr)
+ - uk
+
+ - m
+ - r.m
+
+ - \w\w.m:
+
+ - ar
+ - au
+ - br
+ - ca
+ - cn
+ - de
+ - es
+ - fr
+ - hk
+ - id
+ - ie
+ - in
+ - it
+ - kr
+ - ph
+ - qc
+ - se
+ - sg
+ - mx
+ - tw
+ - uk
+ - us
+ - vn
+
+ - mail
+
+ - *.mail:
+
+ - ar
+ - au
+ - co
+ - e1
+ - es
+ - fr
+ - it
+ - mrd
+ - my
+ - overview
+
+ - \w\w.overview:
+
+ - br
+ - ca
+ - co
+ - e1
+ - hk
+ - ph
+ - tw
+ - uk
+ - us
+
+ - ph
+ - th
+ - tw
+ - us-mg6
+ - vn
+ - c.c.yom
+ - \w+-c.c.yom
+
+ - maktoob
+ - malaysia
+ - tw.mall
+ - tw.user.mall
+ - maps
+
+ - \w\w.maps:
+
+ - au
+ - ca
+ - de
+ - es (→ es.search)
+ - fr
+ - in (→ maps)
+ - it
+ - kr (→ tools.search)
+ - mx (→ espanol.maps)
+ - nz (→ nz.search)
+ - qc
+ - tw
+ - uk
+
+ - espanol.maps
+ - sgws2.maps
+ - au.messages (→ au.answers)
+ - messenger
+
+ - \w\w.messenger:
+
+ - ar
+ - au
+ - br
+ - ca
+ - cf
+ - cl
+ - co
+ - de
+ - e1
+ - es
+ - fr
+ - hk
+ - id
+ - ie (→ uk.messenger)
+ - in
+ - it
+ - kr
+ - mx
+ - my
+ - nz (→ messenger)
+ - pe
+ - ph
+ - qc
+ - sg
+ - th
+ - tw (→ hk)
+ - uk
+ - us
+ - ve
+ - vn
+
+ - malaysia.messenger
+ - \w\w.meteo:
+
+ - fr
+ - it
+
+ - mlogin
+ - mobile
+
+ - \w\w.mobile:
+
+ - ar
+ - au
+ - br
+ - ca
+ - de
+ - dk (→ www)
+ - es
+ - fr
+ - hk
+ - id
+ - ie (→ uk.mobile)
+ - in
+ - it
+ - mx
+ - my
+ - nz
+ - no (→ www)
+ - ph
+ - qc
+ - sg
+ - th
+ - tw
+ - uk
+ - us
+ - vn
+
+ - espanol.mobile
+ - malaysia.mobile
+ - tw.campaign.money
+ - tw.money
+
+ - tw.movie
+
+ - movies subdomains:
+
+ - ^
+ - au
+ - br (→ br.cinema)
+ - ca
+ - es (→ es.cine)
+ - espanol (→ es-us.cine)
+ - fr (→ fr.cinema)
+ - it (→ it.cinema)
+ - nz
+ - au.rss
+ - nz.rss
+ - tw
+ - uk
+
+ - *.msg:
+
+ - dps (→ ycpi-mail-dps)
+ - prod2.rest-core
+ - prod1.rest-notify
+ - ycpi-mail-dps
+ - ycpi-mail-preferences
+ - ycpi-mail-rest-core
+ - ycpi-mail-rest-core2
+
+ - \w\w.mujer:
+
+ - ar
+ - co
+ - mx
+
+ - es-us.mujer
+
+ - music subdomains:
+
+ - ^
+ - ca
+ - hk (→ hk.celebrity)
+ - tw (→ tw.music.yahoo.net)
+
+ - [\w-]+\.musica:
+
+ - es-us
+ - mx
+
+ - my
+ - us.my
+ - de.nachrichten
+ - ucs.netsvs
+
+ - news subdomains:
+
+ - ^
+ - ar (→ ar.noticias)
+ - au
+ - br (→ br.noticias)
+ - au
+ - ca
+ - cl (→ cl.noticias)
+ - co (→ co.noticias)
+ - dk (→ www)
+ - es (→ es.noticias)
+ - fr
+ - gr
+ - hk
+ - ie (→ uk.news)
+ - in
+ - mx (→ mx.noticias)
+ - my
+ - nz
+ - pe (→ pe.noticias)
+ - ph
+ - nz.rss
+ - sg
+ - tw
+ - uk
+ - ve (→ ve.noticias)
+ - vn
+
+ - cookiex.ngd
+
+ - \w\w.noticias
+
+ - ar
+ - br
+ - cl
+ - co
+ - es
+ - mx
+ - pe
+ - ve
+
+ - es-us.noticias
+ - omg
+
+ - \w\w.omg:
+
+ - ar
+ - br
+ - co
+ - es
+ - it
+ - mx
+ - ph
+ - tw
+
+ - es-us.omg
+ - on (→ pilotx1)
+ - au.oztips
+ - rtb.pclick
+ - pilotx1
+ - pipes
+ - play
+ - playerio
+ - privacy
+ - profile
+ - tw.promo
+
+ - au.promotions
+ - hk.promotions
+ - nz.promotions
+
+ - publishing
+
+ - query subdomains:
+
+ - analytics
+ - mailapps
+ - media
+ - ucs
+ - us-locdrop
+ - video
+
+ - tw.rd
+ - us.rd
+
+ - safely
+
+ - \w\w.safely:
+
+ - ar (→ ar.seguridad)
+ - au
+ - ca
+ - cl (→ cl.seguridad)
+ - co
+ - de
+ - fr
+ - hk
+ - id
+ - in
+ - it
+ - mx (→ mx.seguridad)
+ - my
+ - nz
+ - pe (→ pe.seguridad)
+ - ph
+ - sg
+ - tw
+ - uk
+ - ve (→ ve.seguridad)
+
+ - es-us.safely (→ es.us.seguridad)
+ - fr-ca.safely
+ - malaysia.safely (→ my.safely)
+
+ - screen
+
+ - \w\w.screen:
+
+ - ar
+ - br
+ - ca
+ - co
+ - de
+ - es
+ - fr
+ - hk
+ - in
+ - it
+ - mx
+ - tw
+ - uk
+
+ - es-us.screen
+ - scribe
+
+ - search subdomains:
+
+ - ^
+
+ - \w\w:
+
+ - ar
+ - au
+ - be
+ - br
+ - ca
+ - cl
+ - cn (→ sg)
+ - co
+ - de
+ - dk
+ - es
+ - fi
+ - fr
+ - gr
+ - hk
+ - id
+ - ie
+ - in
+ - it
+ - kr
+ - mx
+ - my (→ malaysia)
+ - nl
+ - no
+ - nz
+ - pe
+ - ph
+ - ru
+ - se
+ - sg
+ - tw
+ - uk
+ - ve
+ - vn
+
+ - \w\w.blog:
+
+ - tw
+
+ - \w\w.dictionary:
+
+ - tw
+
+ - finance
+
+ - \w\w.finance:
+
+ - au
+ - nz
+
+ - images
+
+ - \w\w.images:
+
+ - ar
+ - au
+ - br
+ - ca
+ - cn (→ sg.images.search)
+ - de
+ - dk
+ - es
+ - fi
+ - fr
+ - hk
+ - id
+ - in
+ - it
+ - kr (→ kr.search)
+ - nl
+ - mx
+ - my (→ malaysia.images.search)
+ - no
+ - nz
+ - pe
+ - ph
+ - qc
+ - ru
+ - se
+ - sg
+ - tw
+ - uk
+ - ve
+ - vn
+
+ - malaysia.images
+
+ - \w\w.knowledge:
+
+ - tw
+
+ - \w\w.lifestyle:
+
+ - au
+ - nz
+
+ - \w\w.local:
+
+ - tw
+
+ - malaysia
+
+ - nz.maps (→ nz.search)
+
+ - \w\w.news:
+
+ - ar
+ - au
+ - ca
+ - de
+ - fr
+ - sg
+ - tw
+ - uk
+
+ - malaysia.news
+
+ - movies
+
+ - \w\w.movies:
+
+ - au
+ - ca
+ - es
+ - fr
+ - it
+ - nz
+ - sg
+ - uk
+
+ - news
+
+ - \w\w.news:
+
+ - ar
+ - au
+ - br
+ - es
+ - fr
+ - it
+ - nz
+ - pe
+ - sg
+ - uk
+
+ - r
+ - recipes
+
+ - \w\w.recipes:
+
+ - ar
+ - au
+ - br
+ - es
+ - fr
+ - it
+ - mx
+ - nz
+ - tw
+ - uk
+
+ - shine
+ - shopping
+
+ - \w\w.shopping:
+
+ - tw
+
+ - sports
+
+ - \w\w.sports:
+
+ - au
+ - nz
+
+ - profiles.sports
+ - tools
+ - au.tv
+ - video
+
+ - \w\w.video:
+
+ - ar
+ - au
+ - br
+ - ca
+ - de
+ - es
+ - fr
+ - hk
+ - id
+ - in
+ - it
+ - mx
+ - my (→ malaysia.video)
+ - nz
+ - ph
+ - qc
+ - sg
+ - tw
+ - uk
+ - vn
+
+ - malaysia.video
+
+ - kr.searchad (→ tools.search)
+ - rtb.pclick.secure
+ - security
+ - tw.security
+
+ - \w\w.seguranca:
+
+ - br
+
+ - \w\w.seguridad:
+
+ - ar
+ - cl
+ - co
+ - mx
+ - pe
+ - ve
+
+ - es-us.seguridad
+
+ - \w\w.seguro:
+
+ - seguro
+
+ - tw.serviceplus
+ - settings
+ - shine
+ - ca.shine
+ - shopping
+ - ca.shopping
+
+ - \w+.sitios:
+
+ - co
+ - mx
+
+ - dashboard.slingstone
+
+ - smallbusiness
+ - au.smallbusiness
+ - order.smallbusiness
+
+ - smarttv
+
+ - de.solutions (→ de.adspecs)
+ - es.solutions (→ es.adspecs)
+ - fr.solutions (→ fr.adspecs)
+ - it.solutions (→ it.adspecs)
+ - nz.solutions (→ nz.advertising)
+ - uk.solutions (→ uk.adspecs)
+
+ - rd.software
+ - de.spiele
+
+ - sport (→ sports)
+
+ - sports subdomains:
+
+ - ^
+ - au
+ - ca
+ - de (→ de.eurosport)
+ - es (→ es.eurosport)
+ - fr
+ - hk
+ - nz
+ - ph
+ - au.rss
+ - nz.rss
+ - tw
+ - uk (→ uk.eurosport)
+
+ - tw.stock
+ - au.thehype
+
+ - \w\w.tiempo:
+
+ - ar
+ - es
+
+ - au.todaytonight (→ au.news)
+ - es.todo
+ - toolbar
+
+ - \w\w.toolbar:
+
+ - ar
+ - au
+ - br
+ - ca
+ - cl
+ - cn
+ - co
+ - de
+ - es
+ - fr
+ - hk
+ - id
+ - in
+ - it
+ - mx
+ - my
+ - nz
+ - pe
+ - ph
+ - sg
+ - tw
+ - uk
+ - ve
+ - vn
+
+ - data.toolbar
+ - malaysia.toolbar
+ - au.totaltravel
+ - nz.totaltravel
+ - transparency
+ - travel
+ - au.travel (→ au.totaltravel)
+ - ca.travel (→ travel)
+ - my.travel (→ my.news)
+ - nz.travel (→ nz.totaltravel)
+ - ph.travel (→ ph.news)
+ - tw.travel
+ - uk.travel (→ uk.lifestyle)
+
+ - tv subdomains:
+
+ - ^
+ - ar
+ - au
+ - br
+ - ca (→ tv)
+ - de
+ - es
+ - es-us
+ - fr
+ - hk (→ hk.celebrity)
+ - it
+ - mx
+ - nz
+ - pe (→ es-us.tv)
+ - au.rss
+ - uk
+
+ - tw.uwant
+
+ - video subdomains:
+
+ - ^ (→ screen)
+ - ar (→ ar.screen)
+ - au (→ au.tv)
+ - br (→ br.screen)
+ - ca (→ ca.screen)
+ - co (→ co.screen)
+ - de (→ de.screen)
+ - es (→ es.screen)
+ - es-us (→ es-us.screen)
+ - fr (→ fr.screen)
+ - hk (→ help)
+ - in (→ in.screen)
+ - it (→ it.screen)
+ - mh
+ - mx (→ mx.screen)
+ - nz
+ - pe (→ es-us.screen)
+ - qos
+ - uk (→ uk.screen)
+ - ve (→ es-us.screen)
+ - yep
+
+ - weather subdomains:
+
+ - ^
+ - ar (→ ar.tiempo)
+ - au
+ - ca
+ - cl (→ cl.clima)
+ - co (→ co.clima)
+ - es (→ es.tiempo)
+ - espanol (→ es-us.clima)
+ - fr (→ fr.meteo)
+ - hk
+ - in
+ - it (→ it.meteo)
+ - mx (→ mx.clima)
+ - nz
+ - pe (→ pe.clima)
+ - ph
+ - sg
+ - tw (→ tw.news)
+ - uk
+ - us
+ - ve (→ ve.clima)
+
+ - de.wetter
+ - widgets (→ www)
+ - au.yel
+ - video.media.yql
+ - dmros.ysm
+
+
+ These altnames don't exist:
+
+ - manhattan.yahoo.com
+ - tw.moderation.money.yahoo.com
+
+
+ Observed cookie domains:
+
+ - . ¹
+ - .answers ²
+ - .auctions ¹
+ - .bid ¹
+ - .buy ⁴
+ - commercecentral
+ - developers.commercecentral ²
+ - .contributor ⁵
+ - tw.ysm.emarketing ³
+ - games ³
+ - homes ³
+ - au.local ³
+ - .maps ³
+ - .playerio ³
+ - profile ³
+ - .search ⁴
+ - .\w\w.tv ³
+ - tw.uwant ³
+ - .voices ⁵
+ - .www ³
+
+ ¹ Partially secured by us <= accounting for possible use on unsecurable domains
+ ² Secured by server
+ ⁵ Some secured by server, rest by us
+ ³ Secured by us <= not secured by server
+ ⁴ Not secured by us <= accounting for possible use on unsecurable domains
+ ⁵ Not secured by us <= no tls support
+
+
+ Mixed content:
+
+ - css, on:
+
+ - au.gwn7, tw.money, au.rss.news, and au.prime7 from l[13]?.yimg.com ¹
+
+ - Ads/web bugs, on:
+
+ - au.games from secure-us.imrworldwide.com ¹
+ - \w\w.celebrity, m, \w\w.m, and ar.mujer from csc.beap.bc.yahoo.com ¹
+ - au.news from au.adserver.yahoo.com ¹
+ - shine from www.facebook.com ¹
+
+ - Images, on:
+
+ - au.local from dacsisb9yvy2v.cloudfront.net ¹
+ - au.advertising, nz.advertising, au.answers, nz.answers, ph.answers, sg.answers, au, biz, \w\w.celebrity, cricket, nz.entertainment, eurosport, \w\w.eurosport, everything, au.fango, games, ichart, au.launch, nz.lifestyle, au.local, sg.messenger, tw.money, au.movies, nz.movies, au.news, nz.news, au.oztips, au.promotions, \w\w.safely, fr-ca.safely, search, \w\w.seguridad, es-us.seguridad, es.seguro, au.smallbusiness, au.rss.sports, nz.rss.sports, au.thehype, tw.toolbar, au.totaltravel, nz.totaltravel, au.tv, nz.tv, au.rss.tv, and nz.weather from l.yimg.com ¹
+ - ca.autos from yui.yahooapis.com ¹
+ - tw.info from l.yimg.com ¹
+ - tw.knowledge from tw.tool.ks ¹
+ - tw.knowledge from l.yimg.com ¹
+ - tw.money from ichart ¹
+ - tw.money from tw.news2.yimg.com ²
+ - tw.promo from www.adobe.com ¹
+ - au.totaltravel and nz.totaltravel from www.totaltravel.com ²
+ - \w\w.weather and de.wetter from media.zenfs.com ¹
+
+ - faivcon on tw from tw *
+
+ - Ads, on:
+
+ - fr.finance from www.borse.it ³
+ - tw.promo from www.facebook.com ¹
+ - de.kino from yahoo.quizaction.de ¹
+ - my.news from widgets.wego.com ²
+
+ ¹ Secured by us
+ ² Unsecurable
+ ³ Unsecurable <= redirects to http
+
+
+ Reported to fix bug
+
+ https://trac.torproject.org/projects/tor/ticket/4441
+
+
+ If you have a Yahoo Mail account, please test this ruleset!
+
+-->
+<ruleset name="Yahoo! (partial)">
+
+ <target host="i.acdn.us" />
+ <target host="rocketmail.com" />
+ <target host="www.rocketmail.com" />
+ <target host="totaltravel.co.uk" />
+ <target host="www.totaltravel.co.uk" />
+ <target host="totaltravel.com" />
+ <target host="*.totaltravel.com" />
+ <exclusion pattern="^http://(?:www\.)?totaltravel\.com/images/" />
+ <target host="yahoo.com" />
+ <target host="*.yahoo.com" />
+ <!--
+ Refused:
+ -->
+ <exclusion pattern="^http://(?:(?:cn|kr|tw)\.adspecs|(?:co|espanol|mx)\.astrology|kr\.mobile)\.yahoo\.com/" />
+ <!--
+ Redirect destination cert mismatched:
+ -->
+ <exclusion pattern="^http://ca\.local\.yahoo\.com/" />
+ <!--
+ Refused:
+ -->
+ <exclusion pattern="^http://cn\.overview\.mail\.yahoo\.com/" />
+ <!--exclusion pattern="^http://(cn|de|dk|id|ie|it|qc)\.news\.yahoo\.com/" /-->
+ <!--
+ Destination has mismatched cert:
+ -->
+ <exclusion pattern="^http://(?:br|es)\.safely\.yahoo\.com/" />
+ <target host="*.yahoofs.com" />
+ <target host="yhoo.it" />
+ <target host="ymail.com" />
+ <target host="www.ymail.com" />
+ <target host="*.zenfs.com" />
+
+
+ <!-- Some Yahoo cookies are cross-domain cookies.
+ It's a case of figuring out which ones
+ aren't needed on unsecurable pages.
+
+ - .yahoo.com
+ - AO
+ - B
+ - Set by y3.analytics.yahoo.com/itr.pl & us.bc.yahoo.com/b
+
+ - BA
+
+ - t=\d{10}
+
+ - CH
+ - \w{59}/
+ - F
+
+ - HP
+
+ - 0
+
+ - MSC
+ - t=\d{10}X
+ - PH (set by hjsal)
+ - SSL
+
+ - ucs (set by ucs.query)
+
+ - bnas=\d
+
+ - V
+
+ - v=\d.\d&cc=0&m=0
+
+ - Y
+
+ -->
+ <!--
+ Secured by server:
+ -->
+ <!--securecookie host="^\.answers\.yahoo\.com$" name="^answers3$" /-->
+ <!--securecookie host="^(developers\.)?commercecentral\.yahoo\.com$" name="^_rockstar_session$" /-->
+ <!--securecookie host="^\.contributor\.yahoo\.com$" name="^c$" /-->
+ <!--
+ Not secured by server:
+ -->
+ <!--securecookie host="^\.yahoo\.com$" name="^(AO|B|PH|au_ytv|tt_currency)$" /-->
+ <!--securecookie host="^\.auctions\.yahoo\.com$" name="^hkRecentHistory$" /-->
+ <!--securecookie host="^\.bid\.yahoo\.com$" name="^twRecentHistory$" /-->
+ <!--securecookie host="^commercecentral\.yahoo\.com$" name="^first_referer$" /-->
+ <!--securecookie host="^\.contributor\.yahoo\.com$" name="^ACSESS$" /-->
+ <!--securecookie host="^(\w\w\.celebridades|\w\w\.cinema|everything|\w\w\.financas|games|homes|\w\w\.news)\.yahoo\.com$" name="^AO$" /-->
+ <!--securecookie host="^tw\.ysm\.emarketing\.yahoo\.com$" name="^(device|is_c|tw_ysm_soeasy)$" /-->
+ <!--securecookie host="^(uk\.)?help\.yahoo\.com$" name="^(JSESSIONID|scav|scwysiwygparams)$" /-->
+ <!--securecookie host="^au\.local\.yahoo\.com$" name="^(aunz\.aulocal\.cookie|au_yloc)$" /-->
+ <!--securecookie host="^\.maktoob\.yahoo\.com$" name="^hpc$" /-->
+ <!--securecookie host="^\.maps\.yahoo\.com$" name="^MYCFL$" /-->
+ <!--securecookie host="^\.playerio\.yahoo\.com$" name="^playcodes-\d+$" /-->
+ <!--securecookie host="^profile\.yahoo\.com$" name="^YPRF$" /-->
+ <!--securecookie host="^\.search\.yahoo\.com$" name="^sSN$" /-->
+ <!--securecookie host="^\.es\.tv\.yahoo\.com$" name="^tv_listings_last_time$" /-->
+ <!--securecookie host="^tw\.uwant\.yahoo\.com$" name="^uwwtutorial$" /-->
+ <!--securecookie host="^\.www\.yahoo\.com$" name="^fpc$" /-->
+
+ <securecookie host="^\.yahoo\.com$" name="^(?:AO|B|SSL)$" />
+ <securecookie host="^(?:\.analytics|\w\w\.celebridades|\w\w\.cinema|commercecentral|\.contributor|tw\.ysm\.emarketing|everything|\w\w\.financas|games|help|\w\w\.help|homes|\w\w\.local|\.mail|\.maps|\.maktoob|movies|\.?news|\w\w.news|\.playerio|profile|(?:us-locdrop|video)\.query|images\.search|fr\.images\.search|\.toolbar|\.\w\w\.tv|\.uk|\.?us|tw\.uwant|\.www)\.yahoo\.com$" name=".+" />
+ <securecookie host="^\.bid\.yahoo\.com$" name="^twRecentHistory$" />
+ <securecookie host="^\.auctions\.yahoo\.com$" name="^hkRecentHistory$" />
+ <securecookie host="^\.zenfs\.com$" name="^BX$" />
+
+ <!-- Could we secure any of these safely?
+ -->
+ <!--securecookie host="^\.yahoo\.com$" name="^(DK|PH|au_ytv|tt_currency)$" /-->
+ <!--securecookie host="^\.buy\.yahoo\.com$" name="^YAct$" /-->
+ <!--securecookie host="^\.my\.yahoo\.com$" name="^(myc|MYTMI|U_mtupes)$" /-->
+ <!--securecookie host="^\.search\.yahoo\.com$" name="^sSN$" /-->
+
+
+ <rule from="^http://i\.acdn\.us/"
+ to="https://s.yimg.com/ck/" />
+
+ <rule from="^http://(?:www\.)?(?:rocket|y)mail\.com/"
+ to="https://mail.yahoo.com/" />
+
+ <rule from="^http://(?:www\.)?totaltravel\.co(?:m|\.uk)/"
+ to="https://au.totaltravel.yahoo.com/" />
+
+ <rule from="^http://builder\.totaltravel\.com/"
+ to="https://builder.totaltravel.com/" />
+
+ <!-- Redirect drops path and args:
+ -->
+ <rule from="^http://fr\.actualites\.yahoo\.com/.*"
+ to="https://fr.news.yahoo.com/" />
+
+ <rule from="^http://advertisingcentral\.yahoo\.com/+(?=$|\?)"
+ to="https://advertising.yahoo.com/" />
+
+ <!-- Redirect preserves path and args:
+ -->
+ <rule from="^http://(?:cl|co|pe|ve)\.answers\.yahoo\.com/+"
+ to="https://espanol.answers.yahoo.com/" />
+
+ <!-- Redirect drops path but not args:
+ -->
+ <rule from="^http://(au|nz)\.astrology\.yahoo\.com/[^?]*"
+ to="https://$1.lifestyle.yahoo.com/horoscopes/" />
+
+ <!-- Redirect drops path and args:
+ -->
+ <rule from="^http://ca\.astrology\.yahoo\.com/.*"
+ to="https://ca.shine.yahoo.com/horoscope/" />
+
+ <!-- Redirect keeps path and args:
+ -->
+ <rule from="^http://(ar|mx)\.autos\.yahoo\.com/+"
+ to="https://$1.autocosmos.yahoo.net/" />
+
+ <!-- Redirect keeps path and args:
+ -->
+ <rule from="^http://(de|fr)\.autos\.yahoo\.com/+"
+ to="https://$1.cars.yahoo.com/" />
+
+ <!-- Redirect drops path but not args:
+ -->
+ <rule from="^http://(au|nz)\.biz\.yahoo\.com/[^?]*"
+ to="https://$1.finance.yahoo.com/news" />
+
+ <!-- Redirect keeps path and args:
+ -->
+ <rule from="^http://(ar|au|br|ca|cl|de|fr|es|hk|id|ie|in|it|jp|mx|my|no|nz|ph|sg|tw|uk|us|vn)\.careers\.yahoo\.com/+"
+ to="https://careers.yahoo.com/$1/" />
+
+ <!-- Redirect keeps path and args:
+ -->
+ <rule from="^http://malaysia\.careers\.yahoo\.com/+"
+ to="https://careers.yahoo.com/my/" />
+
+ <!-- Redirect keeps path and args:
+ -->
+ <rule from="^http://qc\.careers\.yahoo\.com/+"
+ to="https://careers.yahoo.com/ca/" />
+
+ <!-- Redirect preserves forward slash, path, and args:
+ -->
+ <rule from="^http://cars\.yahoo\.com/"
+ to="https://autos.yahoo.com/" />
+
+ <!-- Redirect drops path and args:
+ -->
+ <rule from="^http://(?:tw\.help\.cc|help\.cc\.tw)\.yahoo\.com/.*"
+ to="https://help.yahoo.com/kb/index?page=home&amp;locale=zh_TW" />
+
+ <!-- Redirect keeps path and args:
+ -->
+ <rule from="^http://cn\.yahoo\.com/+"
+ to="https://sg.yahoo.com/" />
+
+ <!-- Redirect keeps path and args:
+ -->
+ <rule from="^http://(?:cine|espanol\.movies)\.yahoo\.com/+"
+ to="https://es-us.cine.yahoo.com/" />
+
+ <!-- Redirect keeps path and args:
+ -->
+ <rule from="^http://(?:cl|co|pe|ve)\.deportes\.yahoo\.com/+"
+ to="https://es-us.deportes.yahoo.com/" />
+ <!-- Redirect keeps path and args:
+ -->
+ <rule from="^http://es\.deportes\.yahoo\.com/+"
+ to="https://es.eurosport.yahoo.com/" />
+
+ <!-- Redirect keeps path but not args:
+ -->
+ <rule from="^http://au\.dir\.yahoo\.com/+([^?]*).*"
+ to="https://au.search.yahoo.com/web?fr=" />
+
+ <rule from="^http://(?:dk|no|ru)\.yahoo\.com/+"
+ to="https://www.yahoo.com/" />
+
+ <!-- Redirect keeps path and args:
+ -->
+ <rule from="^http://e1\.yahoo\.com/+"
+ to="https://espanol.yahoo.com/" />
+
+ <rule from="^http://hk\.ent\.yahoo\.com/+"
+ to="https://hk.celebrity.yahoo.com/" />
+
+ <rule from="^http://java\.europe\.yahoo\.com/"
+ to="https://adgallery.zenfs.com/" />
+
+ <rule from="^http://fr\.eurosport\.yahoo\.com/"
+ to="https://fr.sports.yahoo.com/" />
+
+ <!-- Server drops path and args:
+ -->
+ <rule from="^http://es\.everything\.yahoo\.com/.*"
+ to="https://es.todo.yahoo.com/" />
+
+ <rule from="^http://fantasysports\.yahoo\.com/(?=$|\?)"
+ to="https://sports.yahoo.com/fantasy" />
+
+ <!-- Server drops path but not args:
+ -->
+ <rule from="^http://es\.laliga\.fantasysports\.yahoo\.com/+"
+ to="https://es.eurosport.yahoo.com/fantasy/la-liga/" />
+
+ <rule from="^http://feedback\.yahoo\.com/"
+ to="https://yahoo.uservoice.com/" />
+
+ <rule from="^http://(i)?chart\.finance\.yahoo\.com/"
+ to="https://$1chart.yahoo.com/" />
+
+ <!-- Redirect drops path buy not args:
+ -->
+ <rule from="^http://connectedtv\.yahoo\.com/[^?]*"
+ to="https://smarttv.yahoo.com/" />
+
+ <!-- Server keeps path and args:
+ -->
+ <rule from="^http://kr\.finance\.yahoo\.com/"
+ to="https://tools.search.yahoo.com/kr-eol.html" />
+
+ <rule from="^http://(au|nz)\.food\.yahoo\.com/"
+ to="https://$1.lifestyle.yahoo.com/food/" />
+
+ <!-- Server keeps path and args:
+ -->
+ <rule from="^http://de\.games\.yahoo\.com/+"
+ to="https://de.spiele.yahoo.com/" />
+
+ <!-- Server keeps path and args:
+ -->
+ <rule from="^http://(?:id|malaysia|nz|ph)\.games\.yahoo\.com/+"
+ to="https://games.yahoo.com/" />
+
+ <!-- Redirect drops path and args:
+ -->
+ <rule from="^http://ie\.(finance|groups|lifestyle)\.yahoo\.com/.*"
+ to="https://uk.$1.yahoo.com/" />
+
+ <!-- Redirect drops path but not args:
+ -->
+ <rule from="^http://au\.(?:answer|forum)s\.yahoo\.com/[^?]*"
+ to="https://au.answers.yahoo.com/" />
+
+ <!-- Redirect drops path and args:
+ -->
+ <rule from="^http://kr\.(?:gugi|maps|searchad)\.yahoo\.com/.*"
+ to="https://tools.search.yahoo.com/kr-eol.html" />
+
+ <rule from="^http://fr\.help\.yahoo\.com/+"
+ to="https://help.yahoo.com/l/fr/yahoo/helpcentral/" />
+
+ <!-- Redirect drops path and args:
+ -->
+ <rule from="^http://help\.cc\.hk\.yahoo\.com/.*"
+ to="https://help.yahoo.com/kb/index?page=home&amp;locale=zh_HK" />
+
+ <!-- Redirect keeps path and args:
+ -->
+ <rule from="^http://(ar|es-us|mx)\.lifestyle\.yahoo\.com/+"
+ to="https://$1.mujer.yahoo.com/" />
+
+ <rule from="^http://ca\.(?:lifestyle|shine)\.yahoo\.com/"
+ to="https://ca.shine.yahoo.com/" />
+
+ <!-- Redirect drops path and args:
+ -->
+ <rule from="^http://fr\.local\.yahoo\.com/.*"
+ to="https://fr.yahoo.com/" />
+
+
+ <!-- Redirect drops path and args:
+ -->
+ <rule from="^http://es\.maps\.yahoo\.com/.*"
+ to="https://es.search.yahoo.com/search/es?p=callejero+itinerarios&amp;y=y" />
+
+ <!-- Redirect drops path and args:
+ -->
+ <rule from="^http://in\.maps\.yahoo\.com/.*"
+ to="https://maps.yahoo.com/" />
+
+ <!-- Redirect keeps path and args:
+ -->
+ <rule from="^http://mx\.maps\.yahoo\.com/+"
+ to="https://espanol.maps.yahoo.com/" />
+
+ <!-- Redirect keeps path and args:
+ -->
+ <rule from="^http://nz\.maps\.yahoo\.com/+"
+ to="https://nz.search.yahoo.com/search/maps/" />
+
+ <!-- Redirect drops path and args:
+ -->
+ <rule from="^http://ie\.messenger\.yahoo\.com/.*"
+ to="https://uk.messenger.yahoo.com/" />
+
+ <!-- Redirect drops path but not args:
+ -->
+ <rule from="^http://nz\.messenger\.yahoo\.com/[^?].*"
+ to="https://messenger.yahoo.com/" />
+
+ <!-- Redirect drops path and args:
+ -->
+ <rule from="^http://ie\.mobile\.yahoo\.com/.*"
+ to="https://uk.mobile.yahoo.com/" />
+
+ <!-- Redirect keeps path and args:
+ -->
+ <rule from="^http://tw\.music\.yahoo\.com/+"
+ to="https://tw.music.yahoo.net/" />
+
+ <!-- Redirect drops path and args:
+ -->
+ <rule from="^http://(?:axis|(?:dk|no)\.mobile|dk\.news)\.yahoo\.com/.*"
+ to="https://www.yahoo.com/" />
+
+ <!-- Redirect keeps path and args:
+ -->
+ <rule from="^http://es\.movies\.yahoo\.com/+"
+ to="https://es.cine.yahoo.com/" />
+
+ <!-- Redirect keeps path and args:
+ -->
+ <rule from="^http://(br|fr|it)\.movies\.yahoo\.com/+"
+ to="https://$1.cinema.yahoo.com/" />
+
+ <!-- This rule must be above the main one:
+ -->
+ <rule from="^http://dps\.msg\.yahoo\.com/"
+ to="https://ycpi-mail-dps.msg.yahoo.com/" />
+
+ <!-- Redirect drops path and args:
+ -->
+ <rule from="^http://hk\.(?:music|tv)\.yahoo\.com/.*"
+ to="https://hk.celebrity.yahoo.com/music/" />
+
+ <rule from="^http://(ar|br|co|es|mx|pe)\.news\.yahoo\.com/+"
+ to="https://$1.noticias.yahoo.com/" />
+
+ <!-- Redirect drops paths and args:
+ -->
+ <rule from="^http://ie\.news\.yahoo\.com/.*"
+ to="https://uk.news.yahoo.com/n/news_ireland.html" />
+
+ <rule from="^http://on\.yahoo\.com/+"
+ to="https://pilotx1.yahoo.com/" />
+
+ <!-- Cert only matches us.rd,
+ all appear equivalent.
+ -->
+ <rule from="^http://rds?\.yahoo\.com/"
+ to="https://us.rd.yahoo.com/" />
+
+ <rule from="^http://(ar|cl|co|es-us|mx|pe|ve)\.safely\.yahoo\.com/+"
+ to="https://$1.seguridad.yahoo.com/" />
+
+ <rule from="^http://malaysia\.safely\.yahoo\.com/+"
+ to="https://my.safely.yahoo.com/" />
+
+ <!-- Redirect drops paths and args:
+ -->
+ <rule from="^http://cn\.search\.yahoo\.com/.*"
+ to="https://sg.search.yahoo.com/" />
+
+ <!-- Redirect drops paths and args:
+ -->
+ <rule from="^http://kr\.(?:images\.)?search\.yahoo\.com/.*"
+ to="https://kr.search.yahoo.com/" />
+
+ <rule from="^http://my\.images\.search\.yahoo\.com/"
+ to="https://malaysia.images.search.yahoo.com/" />
+
+ <!-- Redirect keeps path and args:
+ -->
+ <rule from="^http://nz\.maps\.search\.yahoo\.com/+"
+ to="https://nz.search.yahoo.com/" />
+
+ <rule from="^http://my\.search\.yahoo\.com/+"
+ to="https://malaysia.search.yahoo.com/" />
+
+ <!-- Redirect drops path but not args:
+ -->
+ <rule from="^http://(de|es|fr|it|uk)\.solutions\.yahoo\.com/[^?]*"
+ to="https://$1.adspecs.yahoo.com/" />
+
+ <rule from="^http://sport\.yahoo\.com/+"
+ to="https://sports.yahoo.com/" />
+
+ <rule from="^http://(de|es|uk)\.sports\.yahoo\.com/+"
+ to="https://$1.eurosport.yahoo.com/" />
+
+ <rule from="^http://in\.sports\.yahoo\.com/+$"
+ to="https://cricket.yahoo.com/" />
+
+ <!-- Server drops paths but not args:
+ -->
+ <rule from="^http://au\.todaytonight\.yahoo\.com/+\??$"
+ to="https://au.news.yahoo.com/today-tonight/" />
+
+ <rule from="^http://au\.todaytonight\.yahoo\.com/[^?]*"
+ to="https://au.news.yahoo.com/today-tonight/" />
+
+ <!-- Redirect drops path but not args:
+ -->
+ <rule from="^http://(au|nz)\.travel\.yahoo\.com/[^?]*"
+ to="https://$1.totaltravel.yahoo.com/" />
+
+ <!-- Redirect keeps path and args:
+ -->
+ <rule from="^http://ca\.travel\.yahoo\.com/+"
+ to="https://travel.yahoo.com/" />
+
+ <!-- Redirect drops path and args:
+ -->
+ <rule from="^http://(my|ph)\.travel\.yahoo\.com/.*"
+ to="https://$1.news.yahoo.com/travel/" />
+
+ <!-- Redirect drops path and args:
+ -->
+ <rule from="^http://uk\.travel\.yahoo\.com/.*"
+ to="https://uk.lifestyle.yahoo.com/travel/" />
+
+ <rule from="^http://ca\.tv\.yahoo\.com/+"
+ to="https://tv.yahoo.com/" />
+
+ <!-- Redirect keeps path and args:
+ -->
+ <rule from="^http://pe\.tv\.yahoo\.com/+"
+ to="https://es-us.tv.yahoo.com/" />
+
+ <rule from="^http://((?:br|ca|de|es|es-us|fr|it|mx|uk)\.)?video\.yahoo\.com/+"
+ to="https://$1screen.yahoo.com/" />
+
+ <!-- Redirect drops path and args:
+ -->
+ <rule from="^http://(ar|co|in)\.video\.yahoo\.com/.*"
+ to="https://$1.screen.yahoo.com/" />
+
+ <!-- Redirect drops path and args:
+ -->
+ <rule from="^http://au\.video\.yahoo\.com/.*"
+ to="https://au.tv.yahoo.com/plus7/" />
+
+ <!-- Redirect keeps path and args:
+ -->
+ <rule from="^http://[pv]e\.video\.yahoo\.com/+"
+ to="https://es-us.screen.yahoo.com/" />
+
+ <!-- Redirect drops path and args:
+ -->
+ <rule from="^http://hk\.video\.yahoo\.com/.*"
+ to="https://help.yahoo.com/kb/index?page=home&amp;locale=zh_HK" />
+
+ <!-- Server doesn't redirect:
+ -->
+ <rule from="^http://my\.video\.yahoo\.com/"
+ to="https://malaysia.video.yahoo.com/" />
+
+ <rule from="^http://nz\.video\.yahoo\.com/+(?:\?.*)?$"
+ to="https://nz.news.yahoo.com/video/" />
+
+ <!-- Redirect keeps path and args:
+ -->
+ <rule from="^http://(ar|es)\.weather\.yahoo\.com/+"
+ to="https://$1.tiempo.yahoo.com/" />
+
+ <!-- Redirect keeps path and args:
+ -->
+ <rule from="^http://(cl|co|mx|pe|ve)\.weather\.yahoo\.com/+"
+ to="https://$1.clima.yahoo.com/" />
+
+ <!-- Redirect keeps path and args:
+ -->
+ <rule from="^http://espanol\.weather\.yahoo\.com/+"
+ to="https://es-us.clima.yahoo.com/" />
+
+ <!-- Redirect keeps path and args:
+ -->
+ <rule from="^http://(fr|it)\.weather\.yahoo\.com/+"
+ to="https://$1.meteo.yahoo.com/" />
+
+ <!-- Redirect drops path and args:
+ -->
+ <rule from="^http://tw\.weather\.yahoo\.com/.*"
+ to="https://tw.news.yahoo.com/weather-forecast/" />
+
+ <!-- Redirect drops path but not args:
+ -->
+ <rule from="^http://widgets\.yahoo\.com/[^?]*"
+ to="https://www.yahoo.com/" />
+
+ <rule from="^http://((?:\w\w|fr-ca\.actualites|address|\w\w\.address|admanager|(?:\w\w|global)\.adserver|adspecs|\w+\.adspecs|\w+\.adspecs-new|advertising|\w\w\.advertising|beap\.adx|c5a?\.ah|(?:s-)?cookex\.amp|(?:[aosz]|apac|y3?)\.analytics|anc|answers|(?:\w\w|espanol|malaysia)\.answers|antispam|\w\w\.antispam|vn\.antoan|au\.apps|global\.ard|astrology|\w\w\.astrology|hk\.(?:(?:info|f1\.master|f1\.page|search|store|edit\.store|user)\.)?auctions|autos|\w\w\.autos|ar\.ayuda|(?:clicks\.beap|csc\.beap|pn1|row|us)\.bc|tw\.bid|tw\.(?:campaign|master|mb|page|search|store|user)\.bid|(?:m\.)?tw\.bigdeals|tw\.billing|biz|boss|(?:tw\.partner|tw)\.buy|(?:\w\w\.)?calendar|careers|\w\w\.cars|(?:\w\w|es-us)\.celebridades|(?:\w\w\.)?celebrity|tw\.charity|i?chart|(?:\w\w|es-us)\.cine|\w\w\.cinema|(?:\w\w|es-us)\.clima|migration\.cn|(?:deveopers\.)?commercecentral|br\.contribuidores|(?:uk\.)?contributor|au\.dating|(?:\w\w|es-us)\.deportes|developer|tw\.dictionary|dir|downloads|s-b\.dp|(?:eu\.|na\.|sa\.|tw\.)?edit|tw\.(?:ysm\.)?emarketing|en-maktoob|\w\w\.entertainment|espanol|edit\.europe|eurosport|(?:de|es|it|uk)\.eurosport|everything|\w\w\.everything|\w+\.fantasysports|au\.fango|tw\.fashion|br\.financas|finance|(?:\w\w|tw\.chart|espanol|tw\.futures|streamerapi)\.finance|(?:\w\w|es-us)\.finanzas|nz\.rss\.food|nz\.forums|games|(?:au|ca|uk)\.games|geo|gma|groups|(?:\w\w|asia|espanol|es-us|fr-ca|moderators)\.groups|health|help|(?:\w\w|secure)\.help|homes|(?:tw|tw\.v2)\.house|info|\w\w\.info|tw\.tool\.ks|au\.launch|legalredirect|(?:\w\w)\.lifestyle|(?:gh\.bouncer\.)?login|us\.l?rd|local|\w\w\.local|m|r\.m|\w\w\.m|mail|(?:\w\w\.overview|[\w-]+(?:\.c\.yom)?)\.mail|maktoob|malaysia|tw\.(?:user\.)?mall|maps|(?:\w\w|espanol|sgws2)\.maps|messenger|(?:\w\w|malaysia)\.messenger|\w\w\.meteo|mlogin|mobile|(?:\w\w|espanol|malaysia)\.mobile|tw\.(?:campaign\.)?money|tw\.movie|movies|(?:au|ca|nz|au\.rss|nz\.rss|tw|uk)\.movies|[\w.-]+\.msg|(?:\w\w|es-us)\.mujer|music|ca\.music|[\w-]+\.musica|my|us\.my|de\.nachrichten|ucs\.netsvs|news|(?:au|ca|fr|gr|hk|in|nz|ph|nz\.rss|sg|tw|uk)\.news|cookiex\.ngd|(?:\w\w|es-us)\.noticias|omg|(?:\w\w|es-us)\.omg|au\.oztips|rtb\.pclick|pilotx1|pipes|play|playerio|privacy|profile|tw\.promo|(?:au|hk|nz)\.promotions|publishing|(?:analytics|mailapps|media|ucs|us-locdrop|video)\.query|hk\.rd|(?:\w\w\.|fr-ca\.)?safely|screen|(?:\w\w|es-us)\.screen|scribe|search|(?:\w\w|w\w\.blog|\w\w\.dictionary|finance|\w\w\.finance|images|\w\w\.images|\w\w\.knowledge|\w\w\.lifestyle|\w\w\.local|malaysia|movies|\w\w\.movies|news|\w\w\.news|malaysia\.news|r|recipes|\w\w\.recipes|shine|shopping|\w\w\.shopping|sports|\w\w\.sports|tools|au\.tv|video|\w\w\.video|malaysia\.video)\.search|sec|rtb\.pclick\.secure|security|tw\.security|\w\w\.seguranca|\w\w\.seguridad|es-us\.seguridad|\w\w\.seguro|tw\.serviceplus|settings|shine|ca\.shine|shopping|ca\.shopping|\w+\.sitios|dashboard\.slingstone|(?:au\.|order\.)?smallbusiness|smarttv|rd\.software|de\.spiele|sports|(?:au|ca|fr|hk|nz|ph|profiles|au\.rss|nz\.rss|tw)\.sports|tw\.stock|au\.thehype|\w\w\.tiempo|es\.todo|toolbar|(?:\w\w|data|malaysia)\.toolbar|(?:au|nz)\.totaltravel|transparency|travel|tw\.travel||tv|(?:ar|au|de|fr|es|es-us|it|mx|nz|au\.rss|uk)\.tv|tw\.uwant|(?:mh|nz|qos|yep)\.video|weather|(?:au|ca|hk|in|nz|sg|ph|uk|us)\.weather|de\.wetter|www|au\.yel|video\.media\.yql|dmros\.ysm)\.)?yahoo\.com/"
+ to="https://$1yahoo.com/" />
+
+ <rule from="^http://([\w-]+)\.yahoofs\.com/"
+ to="https://$1.yahoofs.com/" />
+
+ <rule from="^http://yhoo\.it/"
+ to="https://bit.ly/" />
+
+ <rule from="^http://(\w+)\.zenfs\.com/"
+ to="https://$1.zenfs.com/" />
+
+</ruleset>
diff --git a/searx/https_rules/YouTube.xml b/searx/https_rules/YouTube.xml
new file mode 100644
index 000000000..bddc2a5f3
--- /dev/null
+++ b/searx/https_rules/YouTube.xml
@@ -0,0 +1,46 @@
+<ruleset name="YouTube (partial)">
+
+ <target host="youtube.com" />
+ <target host="*.youtube.com" />
+ <exclusion pattern="^http://(?:www\.)?youtube\.com/crossdomain\.xml"/>
+ <exclusion pattern="^http://(?:www\.)?youtube\.com/(?:apiplayer|api_video_info)"/>
+ <exclusion pattern="^http://(?:[^/@:\.]+\.)?ytimg\.com/.*apiplayer[0-9]*\.swf"/>
+ <target host="*.ytimg.com" />
+ <target host="youtu.be" />
+ <target host="youtube-nocookie.com"/>
+ <target host="www.youtube-nocookie.com"/>
+ <target host="*.googlevideo.com"/>
+ <exclusion pattern="^http://([^/@:\.]+)\.googlevideo\.com/crossdomain\.xml"/>
+
+
+ <!-- Not secured by server:
+ -->
+ <!--securecookie host="^\.youtube\.com$" name="^(GEUP|PREF|VISITOR_INFO1_LIVE|YSC)$" /-->
+
+ <!-- observed ^. cookies:
+ - use_hitbox
+ - VISITOR_INFO1_LIVE
+ - recently_watched_video_id_list
+ - .youtube.com -->
+ <securecookie host="^\.youtube\.com" name=".*"/>
+
+
+ <rule from="^http://(www\.)?youtube\.com/"
+ to="https://$1youtube.com/"/>
+
+ <rule from="^http://(br|de|es|fr|il|img|insight|jp|m|nl|uk)\.youtube\.com/"
+ to="https://$1.youtube.com/"/>
+
+ <rule from="^http://([^/@:\.]+)\.ytimg\.com/"
+ to="https://$1.ytimg.com/"/>
+
+ <rule from="^http://youtu\.be/"
+ to="https://youtu.be/"/>
+
+ <rule from="^http://(?:www\.)?youtube-nocookie\.com/"
+ to="https://www.youtube-nocookie.com/"/>
+
+ <rule from="^http://([^/@:\.]+)\.googlevideo\.com/"
+ to="https://$1.googlevideo.com/"/>
+
+</ruleset>
diff --git a/searx/query.py b/searx/query.py
new file mode 100644
index 000000000..612d46f4b
--- /dev/null
+++ b/searx/query.py
@@ -0,0 +1,127 @@
+#!/usr/bin/env python
+
+'''
+searx is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+searx is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with searx. If not, see < http://www.gnu.org/licenses/ >.
+
+(C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
+'''
+
+from searx.languages import language_codes
+from searx.engines import (
+ categories, engines, engine_shortcuts
+)
+import string
+import re
+
+
+class Query(object):
+ """parse query"""
+
+ def __init__(self, query, blocked_engines):
+ self.query = query
+ self.blocked_engines = []
+
+ if blocked_engines:
+ self.blocked_engines = blocked_engines
+
+ self.query_parts = []
+ self.engines = []
+ self.languages = []
+
+ # parse query, if tags are set, which change the serch engine or search-language
+ def parse_query(self):
+ self.query_parts = []
+
+ # split query, including whitespaces
+ raw_query_parts = re.split(r'(\s+)', self.query)
+
+ parse_next = True
+
+ for query_part in raw_query_parts:
+ if not parse_next:
+ self.query_parts[-1] += query_part
+ continue
+
+ parse_next = False
+
+ # part does only contain spaces, skip
+ if query_part.isspace()\
+ or query_part == '':
+ parse_next = True
+ self.query_parts.append(query_part)
+ continue
+
+ # this force a language
+ if query_part[0] == ':':
+ lang = query_part[1:].lower()
+
+ # check if any language-code is equal with declared language-codes
+ for lc in language_codes:
+ lang_id, lang_name, country = map(str.lower, lc)
+
+ # if correct language-code is found, set it as new search-language
+ if lang == lang_id\
+ or lang_id.startswith(lang)\
+ or lang == lang_name\
+ or lang == country:
+ parse_next = True
+ self.languages.append(lang)
+ break
+
+ # this force a engine or category
+ if query_part[0] == '!':
+ prefix = query_part[1:].replace('_', ' ')
+
+ # check if prefix is equal with engine shortcut
+ if prefix in engine_shortcuts\
+ and not engine_shortcuts[prefix] in self.blocked_engines:
+ parse_next = True
+ self.engines.append({'category': 'none',
+ 'name': engine_shortcuts[prefix]})
+
+ # check if prefix is equal with engine name
+ elif prefix in engines\
+ and not prefix in self.blocked_engines:
+ parse_next = True
+ self.engines.append({'category': 'none',
+ 'name': prefix})
+
+ # check if prefix is equal with categorie name
+ elif prefix in categories:
+ # using all engines for that search, which are declared under that categorie name
+ parse_next = True
+ self.engines.extend({'category': prefix,
+ 'name': engine.name}
+ for engine in categories[prefix]
+ if not engine in self.blocked_engines)
+
+ # append query part to query_part list
+ self.query_parts.append(query_part)
+
+ def changeSearchQuery(self, search_query):
+ if len(self.query_parts):
+ self.query_parts[-1] = search_query
+ else:
+ self.query_parts.append(search_query)
+
+ def getSearchQuery(self):
+ if len(self.query_parts):
+ return self.query_parts[-1]
+ else:
+ return ''
+
+ def getFullQuery(self):
+ # get full querry including whitespaces
+ return string.join(self.query_parts, '')
+
diff --git a/searx/search.py b/searx/search.py
index c861a795a..064c68844 100644
--- a/searx/search.py
+++ b/searx/search.py
@@ -16,6 +16,7 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.
'''
import grequests
+import re
from itertools import izip_longest, chain
from datetime import datetime
from operator import itemgetter
@@ -25,6 +26,7 @@ from searx.engines import (
)
from searx.languages import language_codes
from searx.utils import gen_useragent
+from searx.query import Query
number_of_searches = 0
@@ -37,17 +39,14 @@ def default_request_params():
# create a callback wrapper for the search engine results
-def make_callback(engine_name, results, suggestions, callback, params):
+def make_callback(engine_name, results, suggestions, answers, infoboxes, callback, params):
# creating a callback wrapper for the search engine results
def process_callback(response, **kwargs):
cb_res = []
response.search_params = params
- # update stats with current page-load-time
- engines[engine_name].stats['page_load_time'] += \
- (datetime.now() - params['started']).total_seconds()
-
+ # callback
try:
search_results = callback(response)
except Exception, e:
@@ -60,6 +59,7 @@ def make_callback(engine_name, results, suggestions, callback, params):
engine_name, str(e))
return
+ # add results
for result in search_results:
result['engine'] = engine_name
@@ -69,14 +69,37 @@ def make_callback(engine_name, results, suggestions, callback, params):
suggestions.add(result['suggestion'])
continue
+ # if it is an answer, add it to list of answers
+ if 'answer' in result:
+ answers.add(result['answer'])
+ continue
+
+ # if it is an infobox, add it to list of infoboxes
+ if 'infobox' in result:
+ infoboxes.append(result)
+ continue
+
# append result
cb_res.append(result)
results[engine_name] = cb_res
+ # update stats with current page-load-time
+ engines[engine_name].stats['page_load_time'] += \
+ (datetime.now() - params['started']).total_seconds()
+
return process_callback
+# return the meaningful length of the content for a result
+def content_result_len(content):
+ if isinstance(content, basestring):
+ content = re.sub('[,;:!?\./\\\\ ()-_]', '', content)
+ return len(content)
+ else:
+ return 0
+
+
# score results and remove duplications
def score_results(results):
# calculate scoring parameters
@@ -98,8 +121,13 @@ def score_results(results):
res['host'] = res['host'].replace('www.', '', 1)
res['engines'] = [res['engine']]
+
weight = 1.0
+ # strip multiple spaces and cariage returns from content
+ if 'content' in res:
+ res['content'] = re.sub(' +', ' ', res['content'].strip().replace('\n', ''))
+
# get weight of this engine if possible
if hasattr(engines[res['engine']], 'weight'):
weight = float(engines[res['engine']].weight)
@@ -107,9 +135,8 @@ def score_results(results):
# calculate score for that engine
score = int((flat_len - i) / engines_len) * weight + 1
- duplicated = False
-
# check for duplicates
+ duplicated = False
for new_res in results:
# remove / from the end of the url if required
p1 = res['parsed_url'].path[:-1] if res['parsed_url'].path.endswith('/') else res['parsed_url'].path # noqa
@@ -126,7 +153,7 @@ def score_results(results):
# merge duplicates together
if duplicated:
# using content with more text
- if res.get('content') > duplicated.get('content'):
+ if content_result_len(res.get('content', '')) > content_result_len(duplicated.get('content', '')):
duplicated['content'] = res['content']
# increase result-score
@@ -185,6 +212,64 @@ def score_results(results):
return gresults
+def merge_two_infoboxes(infobox1, infobox2):
+ if 'urls' in infobox2:
+ urls1 = infobox1.get('urls', None)
+ if urls1 == None:
+ urls1 = []
+ infobox1.set('urls', urls1)
+
+ urlSet = set()
+ for url in infobox1.get('urls', []):
+ urlSet.add(url.get('url', None))
+
+ for url in infobox2.get('urls', []):
+ if url.get('url', None) not in urlSet:
+ urls1.append(url)
+
+ if 'attributes' in infobox2:
+ attributes1 = infobox1.get('attributes', None)
+ if attributes1 == None:
+ attributes1 = []
+ infobox1.set('attributes', attributes1)
+
+ attributeSet = set()
+ for attribute in infobox1.get('attributes', []):
+ if attribute.get('label', None) not in attributeSet:
+ attributeSet.add(attribute.get('label', None))
+
+ for attribute in infobox2.get('attributes', []):
+ attributes1.append(attribute)
+
+ if 'content' in infobox2:
+ content1 = infobox1.get('content', None)
+ content2 = infobox2.get('content', '')
+ if content1 != None:
+ if content_result_len(content2) > content_result_len(content1):
+ infobox1['content'] = content2
+ else:
+ infobox1.set('content', content2)
+
+
+def merge_infoboxes(infoboxes):
+ results = []
+ infoboxes_id = {}
+ for infobox in infoboxes:
+ add_infobox = True
+ infobox_id = infobox.get('id', None)
+ if infobox_id != None:
+ existingIndex = infoboxes_id.get(infobox_id, None)
+ if existingIndex != None:
+ merge_two_infoboxes(results[existingIndex], infobox)
+ add_infobox=False
+
+ if add_infobox:
+ results.append(infobox)
+ infoboxes_id[infobox_id] = len(results)-1
+
+ return results
+
+
class Search(object):
"""Search information container"""
@@ -207,6 +292,8 @@ class Search(object):
self.results = []
self.suggestions = []
+ self.answers = []
+ self.infoboxes = []
self.request_data = {}
# set specific language if set
@@ -224,9 +311,6 @@ class Search(object):
if not self.request_data.get('q'):
raise Exception('noquery')
- # set query
- self.query = self.request_data['q']
-
# set pagenumber
pageno_param = self.request_data.get('pageno', '1')
if not pageno_param.isdigit() or int(pageno_param) < 1:
@@ -235,7 +319,18 @@ class Search(object):
self.pageno = int(pageno_param)
# parse query, if tags are set, which change the serch engine or search-language
- self.parse_query()
+ query_obj = Query(self.request_data['q'], self.blocked_engines)
+ query_obj.parse_query()
+
+ # set query
+ self.query = query_obj.getSearchQuery()
+
+ # get last selected language in query, if possible
+ # TODO support search with multible languages
+ if len(query_obj.languages):
+ self.lang = query_obj.languages[-1]
+
+ self.engines = query_obj.engines
self.categories = []
@@ -276,60 +371,6 @@ class Search(object):
for x in categories[categ]
if not x.name in self.blocked_engines)
- # parse query, if tags are set, which change the serch engine or search-language
- def parse_query(self):
- query_parts = self.query.split()
- modified = False
-
- # check if language-prefix is set
- if query_parts[0].startswith(':'):
- lang = query_parts[0][1:].lower()
-
- # check if any language-code is equal with declared language-codes
- for lc in language_codes:
- lang_id, lang_name, country = map(str.lower, lc)
-
- # if correct language-code is found, set it as new search-language
- if lang == lang_id\
- or lang_id.startswith(lang)\
- or lang == lang_name\
- or lang == country:
- self.lang = lang
- modified = True
- break
-
- # check if category/engine prefix is set
- elif query_parts[0].startswith('!'):
- prefix = query_parts[0][1:].replace('_', ' ')
-
- # check if prefix is equal with engine shortcut
- if prefix in engine_shortcuts\
- and not engine_shortcuts[prefix] in self.blocked_engines:
- modified = True
- self.engines.append({'category': 'none',
- 'name': engine_shortcuts[prefix]})
-
- # check if prefix is equal with engine name
- elif prefix in engines\
- and not prefix in self.blocked_engines:
- modified = True
- self.engines.append({'category': 'none',
- 'name': prefix})
-
- # check if prefix is equal with categorie name
- elif prefix in categories:
- modified = True
- # using all engines for that search, which are declared under that categorie name
- self.engines.extend({'category': prefix,
- 'name': engine.name}
- for engine in categories[prefix]
- if not engine in self.blocked_engines)
-
- # if language, category or engine were specificed in this query, search for more tags which does the same
- if modified:
- self.query = self.query.replace(query_parts[0], '', 1).strip()
- self.parse_query()
-
# do search-request
def search(self, request):
global number_of_searches
@@ -338,6 +379,8 @@ class Search(object):
requests = []
results = {}
suggestions = set()
+ answers = set()
+ infoboxes = []
# increase number of searches
number_of_searches += 1
@@ -382,6 +425,8 @@ class Search(object):
selected_engine['name'],
results,
suggestions,
+ answers,
+ infoboxes,
engine.response,
request_params
)
@@ -419,11 +464,14 @@ class Search(object):
# score results and remove duplications
results = score_results(results)
+ # merge infoboxes according to their ids
+ infoboxes = merge_infoboxes(infoboxes)
+
# update engine stats, using calculated score
for result in results:
for res_engine in result['engines']:
engines[result['engine']]\
.stats['score_count'] += result['score']
- # return results and suggestions
- return results, suggestions
+ # return results, suggestions, answers and infoboxes
+ return results, suggestions, answers, infoboxes
diff --git a/searx/settings.yml b/searx/settings.yml
index a627c3676..c4589a0a7 100644
--- a/searx/settings.yml
+++ b/searx/settings.yml
@@ -44,6 +44,10 @@ engines:
engine : duckduckgo_definitions
shortcut : ddd
+ - name : wikidata
+ engine : wikidata
+ shortcut : wd
+
- name : duckduckgo
engine : duckduckgo
shortcut : ddg
@@ -168,3 +172,4 @@ locales:
es : Español
it : Italiano
nl : Nederlands
+ ja : 日本語 (Japanese)
diff --git a/searx/settings_robot.yml b/searx/settings_robot.yml
index 98944a811..bb91dce8f 100644
--- a/searx/settings_robot.yml
+++ b/searx/settings_robot.yml
@@ -4,6 +4,9 @@ server:
debug : False
request_timeout : 3.0 # seconds
base_url: False
+ themes_path : ""
+ default_theme : default
+ https_rewrite : True
engines:
- name : general_dummy
diff --git a/searx/static/default/css/style.css b/searx/static/default/css/style.css
index 9a6faadef..70265b072 100644
--- a/searx/static/default/css/style.css
+++ b/searx/static/default/css/style.css
@@ -40,7 +40,8 @@ a{text-decoration:none;color:#1a11be}a:visited{color:#8e44ad}
.result_title a:visited{color:#8e44ad}
.cache_link{font-size:10px !important}
.result h3{font-size:1em;word-wrap:break-word;margin:5px 0 1px 0;padding:0}
-.result .content{font-size:.8em;margin:0;padding:0;max-width:54em;word-wrap:break-word;line-height:1.24}
+.result .content{font-size:.8em;margin:0;padding:0;max-width:54em;word-wrap:break-word;line-height:1.24}.result .content img{float:left;margin-right:5px;max-width:200px;max-height:100px}
+.result .content br.last{clear:both}
.result .url{font-size:.8em;margin:0 0 3px 0;padding:0;max-width:54em;word-wrap:break-word;color:#c0392b}
.result .published_date{font-size:.8em;color:#888;margin:5px 20px}
.engines{color:#888}
@@ -61,15 +62,20 @@ table{width:100%}
td{padding:0 4px}
tr:hover{background:#ddd}
#results{margin:auto;padding:0;width:50em;margin-bottom:20px}
-#sidebar{position:absolute;top:100px;right:10px;margin:0 2px 5px 5px;padding:0 2px 2px 2px;width:14em}#sidebar input{padding:0;margin:3px;font-size:.8em;display:inline-block;background:transparent;color:#444;cursor:pointer}
+#sidebar{position:fixed;bottom:10px;left:10px;margin:0 2px 5px 5px;padding:0 2px 2px 2px;width:14em}#sidebar input{padding:0;margin:3px;font-size:.8em;display:inline-block;background:transparent;color:#444;cursor:pointer}
#sidebar input[type="submit"]{text-decoration:underline}
-#suggestions{margin-top:20px}#suggestions span{display:inline;margin:0 2px 2px 2px;padding:0}
-#suggestions input{padding:0;margin:3px;font-size:.8em;display:inline-block;background:transparent;color:#444;cursor:pointer}
-#suggestions input[type="submit"]{text-decoration:underline}
-#suggestions form{display:inline}
+#suggestions,#answers{margin-top:20px}
+#suggestions input,#answers input,#infoboxes input{padding:0;margin:3px;font-size:.8em;display:inline-block;background:transparent;color:#444;cursor:pointer}
+#suggestions input[type="submit"],#answers input[type="submit"],#infoboxes input[type="submit"]{text-decoration:underline}
+#suggestions form,#answers form,#infoboxes form{display:inline}
+#infoboxes{position:absolute;top:100px;right:20px;margin:0 2px 5px 5px;padding:0 2px 2px;max-width:21em}#infoboxes .infobox{margin:10px 0 10px;border:1px solid #ddd;padding:5px;font-size:.8em}#infoboxes .infobox img{max-width:20em;max-heigt:12em;display:block;margin:5px;padding:5px}
+#infoboxes .infobox h2{margin:0}
+#infoboxes .infobox table{width:auto}#infoboxes .infobox table td{vertical-align:top}
+#infoboxes .infobox input{font-size:1em}
+#infoboxes .infobox br{clear:both}
#search_url{margin-top:8px}#search_url input{border:1px solid #888;padding:4px;color:#444;width:14em;display:block;margin:4px;font-size:.8em}
#preferences{top:10px;padding:0;border:0;background:url('../img/preference-icon.png') no-repeat;background-size:28px 28px;opacity:.8;width:28px;height:30px;display:block}#preferences *{display:none}
#pagination{clear:both;width:40em}
#apis{margin-top:8px;clear:both}
-@media screen and (max-width:50em){#categories{font-size:90%;clear:both}#categories .checkbox_container{margin-top:2px;margin:auto} #results{margin:auto;padding:0;width:90%} .github{display:none} .checkbox_container{display:block;width:90%}.checkbox_container label{border-bottom:0}}@media screen and (max-width:70em){.right{display:none;postion:fixed !important;top:100px;right:0} #sidebar{position:static;max-width:50em;margin:0 0 2px 0;padding:0;float:none;border:none;width:auto}#sidebar input{border:0} #apis{display:none} #search_url{display:none} .result{border-top:1px solid #e8e7e6;margin:7px 0 6px 0}.result img{max-width:90%;width:auto;height:auto}}.favicon{float:left;margin-right:4px;margin-top:2px}
+@media screen and (max-width:50em){#results{margin:auto;padding:0;width:90%} .github{display:none} .checkbox_container{display:block;width:90%}.checkbox_container label{border-bottom:0} .right{display:none;postion:fixed !important;top:100px;right:0}}@media screen and (max-width:75em){#infoboxes{position:inherit;max-width:inherit}#infoboxes .infobox{clear:both}#infoboxes .infobox img{float:left;max-width:10em} #categories{font-size:90%;clear:both}#categories .checkbox_container{margin-top:2px;margin:auto} #sidebar{position:static;max-width:50em;margin:0 0 2px 0;padding:0;float:none;border:none;width:auto}#sidebar input{border:0} #apis{display:none} #search_url{display:none} .result{border-top:1px solid #e8e7e6;margin:7px 0 6px 0}}.favicon{float:left;margin-right:4px;margin-top:2px}
.preferences_back{background:none repeat scroll 0 0 #3498db;border:0 none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;cursor:pointer;display:inline-block;margin:2px 4px;padding:4px 6px}.preferences_back a{color:#fff}
diff --git a/searx/static/default/less/style.less b/searx/static/default/less/style.less
index e3fac1b10..c43c0fe72 100644
--- a/searx/static/default/less/style.less
+++ b/searx/static/default/less/style.less
@@ -235,6 +235,17 @@ a {
max-width: 54em;
word-wrap:break-word;
line-height: 1.24;
+
+ img {
+ float: left;
+ margin-right: 5px;
+ max-width: 200px;
+ max-height: 100px;
+ }
+
+ br.last {
+ clear: both;
+ }
}
.url {
@@ -363,9 +374,9 @@ tr {
}
#sidebar {
- position: absolute;
- top: 100px;
- right: 10px;
+ position: fixed;
+ bottom: 10px;
+ left: 10px;
margin: 0 2px 5px 5px;
padding: 0 2px 2px 2px;
width: 14em;
@@ -384,33 +395,80 @@ tr {
}
}
-#suggestions {
+#suggestions, #answers {
- margin-top: 20px;
+ margin-top: 20px;
+
+}
+
+#suggestions, #answers, #infoboxes {
- span {
- display: inline;
- margin: 0 2px 2px 2px;
- padding: 0;
- }
input {
padding: 0;
margin: 3px;
font-size: 0.8em;
display: inline-block;
- background: transparent;
- color: @color-result-search-url-font;
+ background: transparent;
+ color: @color-result-search-url-font;
cursor: pointer;
}
- input[type="submit"] {
+
+ input[type="submit"] {
text-decoration: underline;
- }
+ }
form {
display: inline;
}
}
+
+#infoboxes {
+ position: absolute;
+ top: 100px;
+ right: 20px;
+ margin: 0px 2px 5px 5px;
+ padding: 0px 2px 2px;
+ max-width: 21em;
+
+ .infobox {
+ margin: 10px 0 10px;
+ border: 1px solid #ddd;
+ padding: 5px;
+ font-size: 0.8em;
+
+ img {
+ max-width: 20em;
+ max-heigt: 12em;
+ display: block;
+ margin: 5px;
+ padding: 5px;
+ }
+
+ h2 {
+ margin: 0;
+ }
+
+ table {
+ width: auto;
+
+ td {
+ vertical-align: top;
+ }
+
+ }
+
+ input {
+ font-size: 1em;
+ }
+
+ br {
+ clear: both;
+ }
+
+ }
+}
+
#search_url {
margin-top: 8px;
@@ -453,16 +511,6 @@ tr {
@media screen and (max-width: @results-width) {
- #categories {
- font-size: 90%;
- clear: both;
-
- .checkbox_container {
- margin-top: 2px;
- margin: auto;
- }
- }
-
#results {
margin: auto;
padding: 0;
@@ -481,9 +529,7 @@ tr {
border-bottom: 0;
}
}
-}
-@media screen and (max-width: 70em) {
.right {
display: none;
postion: fixed !important;
@@ -491,6 +537,35 @@ tr {
right: 0px;
}
+}
+
+@media screen and (max-width: 75em) {
+
+ #infoboxes {
+ position: inherit;
+ max-width: inherit;
+
+ .infobox {
+ clear:both;
+
+ img {
+ float: left;
+ max-width: 10em;
+ }
+ }
+
+ }
+
+ #categories {
+ font-size: 90%;
+ clear: both;
+
+ .checkbox_container {
+ margin-top: 2px;
+ margin: auto;
+ }
+ }
+
#sidebar {
position: static;
max-width: @results-width;
@@ -515,12 +590,6 @@ tr {
.result {
border-top: 1px solid @color-result-top-border;
margin: 7px 0 6px 0;
-
- img {
- max-width: 90%;
- width: auto;
- height: auto
- }
}
}
diff --git a/searx/templates/default/infobox.html b/searx/templates/default/infobox.html
new file mode 100644
index 000000000..f963e898c
--- /dev/null
+++ b/searx/templates/default/infobox.html
@@ -0,0 +1,44 @@
+<div class="infobox">
+ <h2>{{ infobox.infobox }}</h2>
+ {% if infobox.img_src %}<img src="{{ infobox.img_src }}" />{% endif %}
+ <p>{{ infobox.entity }}</p>
+ <p>{{ infobox.content }}</p>
+ {% if infobox.attributes %}
+ <div class="attributes">
+ <table>
+ {% for attribute in infobox.attributes %}
+ <tr><td>{{ attribute.label }}</td><td>{{ attribute.value }}</td></tr>
+ {% endfor %}
+ </table>
+ </div>
+ {% endif %}
+
+ {% if infobox.urls %}
+ <div class="urls">
+ <ul>
+ {% for url in infobox.urls %}
+ <li class="url"><a href="{{ url.url }}">{{ url.title }}</a></li>
+ {% endfor %}
+ </ul>
+ </div>
+ {% endif %}
+
+ {% if infobox.relatedTopics %}
+ <div class="relatedTopics">
+ {% for topic in infobox.relatedTopics %}
+ <div>
+ <h3>{{ topic.name }}</h3>
+ {% for suggestion in topic.suggestions %}
+ <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
+ <input type="hidden" name="q" value="{{ suggestion }}">
+ <input type="submit" value="{{ suggestion }}" />
+ </form>
+ {% endfor %}
+ </div>
+ {% endfor %}
+ </div>
+ {% endif %}
+
+ <br />
+
+</div>
diff --git a/searx/templates/default/result_templates/default.html b/searx/templates/default/result_templates/default.html
index ac9b9b979..78221aa01 100644
--- a/searx/templates/default/result_templates/default.html
+++ b/searx/templates/default/result_templates/default.html
@@ -8,6 +8,6 @@
<h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
<p class="url">{{ result.pretty_url }} <a class="cache_link" href="https://web.archive.org/web/{{ result.url }}">cached</a></p>
{% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}
- <p class="content">{% if result.content %}{{ result.content|safe }}<br />{% endif %}</p>
+ <p class="content">{% if result.img_src %}<img src="{{ result.img_src }}" class="image" />{% endif %}{% if result.content %}{{ result.content|safe }}<br class="last"/>{% endif %}</p>
</div>
</div>
diff --git a/searx/templates/default/results.html b/searx/templates/default/results.html
index d0b53b48a..b66d6e2af 100644
--- a/searx/templates/default/results.html
+++ b/searx/templates/default/results.html
@@ -30,6 +30,14 @@
</div>
</div>
+ {% if answers %}
+ <div id="answers"><span>{{ _('Answers') }}</span>
+ {% for answer in answers %}
+ <span>{{ answer }}</span>
+ {% endfor %}
+ </div>
+ {% endif %}
+
{% if suggestions %}
<div id="suggestions"><span>{{ _('Suggestions') }}</span>
{% for suggestion in suggestions %}
@@ -41,6 +49,14 @@
</div>
{% endif %}
+ {% if infoboxes %}
+ <div id="infoboxes">
+ {% for infobox in infoboxes %}
+ {% include 'default/infobox.html' %}
+ {% endfor %}
+ </div>
+ {% endif %}
+
{% for result in results %}
{% if result['template'] %}
{% include 'default/result_templates/'+result['template'] %}
diff --git a/searx/tests/test_webapp.py b/searx/tests/test_webapp.py
index 9d1722eeb..9cf586180 100644
--- a/searx/tests/test_webapp.py
+++ b/searx/tests/test_webapp.py
@@ -43,6 +43,8 @@ class ViewsTestCase(SearxTestCase):
def test_index_html(self, search):
search.return_value = (
self.test_results,
+ set(),
+ set(),
set()
)
result = self.app.post('/', data={'q': 'test'})
@@ -51,7 +53,7 @@ class ViewsTestCase(SearxTestCase):
result.data
)
self.assertIn(
- '<p class="content">first <span class="highlight">test</span> content<br /></p>', # noqa
+ '<p class="content">first <span class="highlight">test</span> content<br class="last"/></p>', # noqa
result.data
)
@@ -59,6 +61,8 @@ class ViewsTestCase(SearxTestCase):
def test_index_json(self, search):
search.return_value = (
self.test_results,
+ set(),
+ set(),
set()
)
result = self.app.post('/', data={'q': 'test', 'format': 'json'})
@@ -75,6 +79,8 @@ class ViewsTestCase(SearxTestCase):
def test_index_csv(self, search):
search.return_value = (
self.test_results,
+ set(),
+ set(),
set()
)
result = self.app.post('/', data={'q': 'test', 'format': 'csv'})
@@ -90,6 +96,8 @@ class ViewsTestCase(SearxTestCase):
def test_index_rss(self, search):
search.return_value = (
self.test_results,
+ set(),
+ set(),
set()
)
result = self.app.post('/', data={'q': 'test', 'format': 'rss'})
diff --git a/searx/translations/de/LC_MESSAGES/messages.mo b/searx/translations/de/LC_MESSAGES/messages.mo
index dc2922786..553d3d9d0 100644
--- a/searx/translations/de/LC_MESSAGES/messages.mo
+++ b/searx/translations/de/LC_MESSAGES/messages.mo
Binary files differ
diff --git a/searx/translations/de/LC_MESSAGES/messages.po b/searx/translations/de/LC_MESSAGES/messages.po
index bd4f44d0b..c28759470 100644
--- a/searx/translations/de/LC_MESSAGES/messages.po
+++ b/searx/translations/de/LC_MESSAGES/messages.po
@@ -1,152 +1,188 @@
-# English translations for .
+# English translations for PROJECT.
# Copyright (C) 2014 ORGANIZATION
-# This file is distributed under the same license as the project.
-#
+# This file is distributed under the same license as the PROJECT project.
+#
# Translators:
# pointhi, 2014
# stf <stefan.marsiske@gmail.com>, 2014
+# rike, 2014
msgid ""
msgstr ""
-"Project-Id-Version: searx\n"
+"Project-Id-Version: searx\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2014-03-18 17:10+0100\n"
-"PO-Revision-Date: 2014-03-15 18:40+0000\n"
+"POT-Creation-Date: 2014-09-07 21:47+0200\n"
+"PO-Revision-Date: 2014-09-08 07:00+0000\n"
"Last-Translator: pointhi\n"
-"Language-Team: German "
-"(http://www.transifex.com/projects/p/searx/language/de/)\n"
-"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"Language-Team: German (http://www.transifex.com/projects/p/searx/language/de/)\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 1.3\n"
+"Language: de\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: searx/webapp.py:167
+#: searx/webapp.py:250
msgid "{minutes} minute(s) ago"
-msgstr ""
+msgstr "vor {minutes} Minute(n)"
-#: searx/webapp.py:169
+#: searx/webapp.py:252
msgid "{hours} hour(s), {minutes} minute(s) ago"
-msgstr ""
+msgstr "vor {hours} Stunde(n), {minutes} Minute(n)"
-#: searx/engines/__init__.py:311
+#: searx/engines/__init__.py:164
msgid "Page loads (sec)"
msgstr "Ladezeit (sek)"
-#: searx/engines/__init__.py:315
+#: searx/engines/__init__.py:168
msgid "Number of results"
msgstr "Trefferanzahl"
-#: searx/engines/__init__.py:319
+#: searx/engines/__init__.py:172
msgid "Scores"
msgstr "Punkte"
-#: searx/engines/__init__.py:323
+#: searx/engines/__init__.py:176
msgid "Scores per result"
msgstr "Punkte pro Treffer"
-#: searx/engines/__init__.py:327
+#: searx/engines/__init__.py:180
msgid "Errors"
msgstr "Fehler"
-#: searx/templates/index.html:7
+#: searx/templates/courgette/index.html:8 searx/templates/default/index.html:8
msgid "about"
msgstr "Über uns"
-#: searx/templates/index.html:8
+#: searx/templates/courgette/index.html:9 searx/templates/default/index.html:9
msgid "preferences"
msgstr "Einstellungen"
-#: searx/templates/preferences.html:5
+#: searx/templates/courgette/preferences.html:5
+#: searx/templates/default/preferences.html:5
msgid "Preferences"
msgstr "Einstellungen"
-#: searx/templates/preferences.html:9
+#: searx/templates/courgette/preferences.html:9
+#: searx/templates/default/preferences.html:9
msgid "Default categories"
-msgstr "Standard Kategorien"
+msgstr "Standardkategorien"
-#: searx/templates/preferences.html:15
+#: searx/templates/courgette/preferences.html:15
+#: searx/templates/default/preferences.html:15
msgid "Search language"
msgstr "Suchsprache"
-#: searx/templates/preferences.html:18
+#: searx/templates/courgette/preferences.html:18
+#: searx/templates/default/preferences.html:18
msgid "Automatic"
msgstr "Automatisch"
-#: searx/templates/preferences.html:26
+#: searx/templates/courgette/preferences.html:26
+#: searx/templates/default/preferences.html:26
msgid "Interface language"
msgstr "Oberflächensprache"
-#: searx/templates/preferences.html:36
+#: searx/templates/courgette/preferences.html:36
+#: searx/templates/default/preferences.html:36
+msgid "Autocomplete"
+msgstr "Autovervollständigung"
+
+#: searx/templates/courgette/preferences.html:47
+#: searx/templates/default/preferences.html:47
+msgid "Method"
+msgstr "Methode"
+
+#: searx/templates/courgette/preferences.html:56
+#: searx/templates/default/preferences.html:56
+msgid "Themes"
+msgstr "Designs"
+
+#: searx/templates/courgette/preferences.html:66
+#: searx/templates/default/preferences.html:66
msgid "Currently used search engines"
msgstr "Aktuell benutzte Suchmaschinen"
-#: searx/templates/preferences.html:40
+#: searx/templates/courgette/preferences.html:70
+#: searx/templates/default/preferences.html:70
msgid "Engine name"
msgstr "Suchmaschinenname"
-#: searx/templates/preferences.html:41
+#: searx/templates/courgette/preferences.html:71
+#: searx/templates/default/preferences.html:71
msgid "Category"
msgstr "Kategorie"
-#: searx/templates/preferences.html:42 searx/templates/preferences.html:53
+#: searx/templates/courgette/preferences.html:72
+#: searx/templates/courgette/preferences.html:83
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:83
msgid "Allow"
msgstr "Erlauben"
-#: searx/templates/preferences.html:42 searx/templates/preferences.html:54
+#: searx/templates/courgette/preferences.html:72
+#: searx/templates/courgette/preferences.html:84
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:84
msgid "Block"
msgstr "Blockieren"
-#: searx/templates/preferences.html:62
+#: searx/templates/courgette/preferences.html:92
+#: searx/templates/default/preferences.html:92
msgid ""
-"These settings are stored in your cookies, this allows us not to store "
-"this data about you."
-msgstr ""
-"Diese Informationen werden in Cookies gespeichert, damit wir keine ihrer "
-"persönlichen Daten speichern müssen."
+"These settings are stored in your cookies, this allows us not to store this "
+"data about you."
+msgstr "Diese Informationen werden in Cookies auf Ihrem Rechner gespeichert, damit wir keine Ihrer persönlichen Daten speichern müssen."
-#: searx/templates/preferences.html:64
+#: searx/templates/courgette/preferences.html:94
+#: searx/templates/default/preferences.html:94
msgid ""
"These cookies serve your sole convenience, we don't use these cookies to "
"track you."
-msgstr ""
-"Diese Cookies dienen ihrer Gemütlichkeit, wir verwenden sie nicht zum "
-"überwachen."
+msgstr "Diese Cookies dienen einzig Ihrem Komfort, wir verwenden sie nicht, um Sie zu überwachen."
-#: searx/templates/preferences.html:67
+#: searx/templates/courgette/preferences.html:97
+#: searx/templates/default/preferences.html:97
msgid "save"
msgstr "Speichern"
-#: searx/templates/preferences.html:68
+#: searx/templates/courgette/preferences.html:98
+#: searx/templates/default/preferences.html:98
msgid "back"
msgstr "Zurück"
-#: searx/templates/results.html:11
-msgid "Suggestions"
-msgstr "Vorschläge"
-
-#: searx/templates/results.html:22
+#: searx/templates/courgette/results.html:12
+#: searx/templates/default/results.html:12
msgid "Search URL"
msgstr "Such-URL"
-#: searx/templates/results.html:26
+#: searx/templates/courgette/results.html:16
+#: searx/templates/default/results.html:16
msgid "Download results"
msgstr "Ergebnisse herunterladen"
-#: searx/templates/results.html:62
+#: searx/templates/courgette/results.html:34
+#: searx/templates/default/results.html:34
+msgid "Suggestions"
+msgstr "Vorschläge"
+
+#: searx/templates/courgette/results.html:62
+#: searx/templates/default/results.html:62
msgid "previous page"
msgstr "vorherige Seite"
-#: searx/templates/results.html:73
+#: searx/templates/courgette/results.html:73
+#: searx/templates/default/results.html:73
msgid "next page"
msgstr "nächste Seite"
-#: searx/templates/search.html:3
+#: searx/templates/courgette/search.html:3
+#: searx/templates/default/search.html:3
msgid "Search for..."
msgstr "Suche nach..."
-#: searx/templates/stats.html:4
+#: searx/templates/courgette/stats.html:4 searx/templates/default/stats.html:4
msgid "Engine stats"
-msgstr "Suchmaschienen Statistiken"
+msgstr "Suchmaschinenstatistik"
# categories - manually added
# TODO - automatically add
@@ -174,3 +210,5 @@ msgstr "IT"
msgid "news"
msgstr "Neuigkeiten"
+msgid "map"
+msgstr "Karte"
diff --git a/searx/translations/en/LC_MESSAGES/messages.mo b/searx/translations/en/LC_MESSAGES/messages.mo
index 4f81aa4ba..13936f4fb 100644
--- a/searx/translations/en/LC_MESSAGES/messages.mo
+++ b/searx/translations/en/LC_MESSAGES/messages.mo
Binary files differ
diff --git a/searx/translations/en/LC_MESSAGES/messages.po b/searx/translations/en/LC_MESSAGES/messages.po
index 7141c4db5..7f2ef09e9 100644
--- a/searx/translations/en/LC_MESSAGES/messages.po
+++ b/searx/translations/en/LC_MESSAGES/messages.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2014-03-18 17:10+0100\n"
+"POT-Creation-Date: 2014-10-01 19:24+0200\n"
"PO-Revision-Date: 2014-01-30 15:22+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: en <LL@li.org>\n"
@@ -17,130 +17,181 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 1.3\n"
-#: searx/webapp.py:167
+#: searx/webapp.py:251
msgid "{minutes} minute(s) ago"
msgstr ""
-#: searx/webapp.py:169
+#: searx/webapp.py:253
msgid "{hours} hour(s), {minutes} minute(s) ago"
msgstr ""
-#: searx/engines/__init__.py:311
+#: searx/engines/__init__.py:176
msgid "Page loads (sec)"
msgstr ""
-#: searx/engines/__init__.py:315
+#: searx/engines/__init__.py:180
msgid "Number of results"
msgstr ""
-#: searx/engines/__init__.py:319
+#: searx/engines/__init__.py:184
msgid "Scores"
msgstr ""
-#: searx/engines/__init__.py:323
+#: searx/engines/__init__.py:188
msgid "Scores per result"
msgstr ""
-#: searx/engines/__init__.py:327
+#: searx/engines/__init__.py:192
msgid "Errors"
msgstr ""
-#: searx/templates/index.html:7
+#: searx/templates/courgette/index.html:8 searx/templates/default/index.html:8
msgid "about"
msgstr ""
-#: searx/templates/index.html:8
+#: searx/templates/courgette/index.html:9 searx/templates/default/index.html:9
msgid "preferences"
msgstr ""
-#: searx/templates/preferences.html:5
+#: searx/templates/courgette/preferences.html:5
+#: searx/templates/default/preferences.html:5
msgid "Preferences"
msgstr ""
-#: searx/templates/preferences.html:9
+#: searx/templates/courgette/preferences.html:9
+#: searx/templates/default/preferences.html:9
msgid "Default categories"
msgstr ""
-#: searx/templates/preferences.html:15
+#: searx/templates/courgette/preferences.html:15
+#: searx/templates/default/preferences.html:15
msgid "Search language"
msgstr ""
-#: searx/templates/preferences.html:18
+#: searx/templates/courgette/preferences.html:18
+#: searx/templates/default/preferences.html:18
msgid "Automatic"
msgstr ""
-#: searx/templates/preferences.html:26
+#: searx/templates/courgette/preferences.html:26
+#: searx/templates/default/preferences.html:26
msgid "Interface language"
msgstr ""
-#: searx/templates/preferences.html:36
+#: searx/templates/courgette/preferences.html:36
+#: searx/templates/default/preferences.html:36
+msgid "Autocomplete"
+msgstr ""
+
+#: searx/templates/courgette/preferences.html:47
+#: searx/templates/default/preferences.html:47
+msgid "Method"
+msgstr ""
+
+#: searx/templates/courgette/preferences.html:56
+#: searx/templates/default/preferences.html:56
+msgid "Themes"
+msgstr ""
+
+#: searx/templates/courgette/preferences.html:66
+#: searx/templates/default/preferences.html:66
msgid "Currently used search engines"
msgstr ""
-#: searx/templates/preferences.html:40
+#: searx/templates/courgette/preferences.html:70
+#: searx/templates/default/preferences.html:70
msgid "Engine name"
msgstr ""
-#: searx/templates/preferences.html:41
+#: searx/templates/courgette/preferences.html:71
+#: searx/templates/default/preferences.html:71
msgid "Category"
msgstr ""
-#: searx/templates/preferences.html:42 searx/templates/preferences.html:53
+#: searx/templates/courgette/preferences.html:72
+#: searx/templates/courgette/preferences.html:83
+#: searx/templates/default/preferences.html:73
+#: searx/templates/default/preferences.html:85
msgid "Allow"
msgstr ""
-#: searx/templates/preferences.html:42 searx/templates/preferences.html:54
+#: searx/templates/courgette/preferences.html:72
+#: searx/templates/courgette/preferences.html:84
+#: searx/templates/default/preferences.html:73
+#: searx/templates/default/preferences.html:86
msgid "Block"
msgstr ""
-#: searx/templates/preferences.html:62
+#: searx/templates/courgette/preferences.html:92
+#: searx/templates/default/preferences.html:94
msgid ""
"These settings are stored in your cookies, this allows us not to store "
"this data about you."
msgstr ""
-#: searx/templates/preferences.html:64
+#: searx/templates/courgette/preferences.html:94
+#: searx/templates/default/preferences.html:96
msgid ""
"These cookies serve your sole convenience, we don't use these cookies to "
"track you."
msgstr ""
-#: searx/templates/preferences.html:67
+#: searx/templates/courgette/preferences.html:97
+#: searx/templates/default/preferences.html:99
msgid "save"
msgstr ""
-#: searx/templates/preferences.html:68
+#: searx/templates/courgette/preferences.html:98
+#: searx/templates/default/preferences.html:100
msgid "back"
msgstr ""
-#: searx/templates/results.html:11
-msgid "Suggestions"
-msgstr ""
-
-#: searx/templates/results.html:22
+#: searx/templates/courgette/results.html:12
+#: searx/templates/default/results.html:12
msgid "Search URL"
msgstr ""
-#: searx/templates/results.html:26
+#: searx/templates/courgette/results.html:16
+#: searx/templates/default/results.html:16
msgid "Download results"
msgstr ""
-#: searx/templates/results.html:62
+#: searx/templates/courgette/results.html:34
+#: searx/templates/default/results.html:34
+msgid "Suggestions"
+msgstr ""
+
+#: searx/templates/courgette/results.html:62
+#: searx/templates/default/results.html:62
msgid "previous page"
msgstr ""
-#: searx/templates/results.html:73
+#: searx/templates/courgette/results.html:73
+#: searx/templates/default/results.html:73
msgid "next page"
msgstr ""
-#: searx/templates/search.html:3
+#: searx/templates/courgette/search.html:3
+#: searx/templates/default/search.html:3
msgid "Search for..."
msgstr ""
-#: searx/templates/stats.html:4
+#: searx/templates/courgette/stats.html:4 searx/templates/default/stats.html:4
msgid "Engine stats"
msgstr ""
+#: searx/templates/default/preferences.html:72
+msgid "Localization"
+msgstr ""
+
+#: searx/templates/default/preferences.html:82
+msgid "Yes"
+msgstr ""
+
+#: searx/templates/default/preferences.html:82
+msgid "No"
+msgstr ""
+
# categories - manually added
# TODO - automatically add
msgid "files"
@@ -167,3 +218,6 @@ msgstr ""
msgid "news"
msgstr ""
+msgid "map"
+msgstr ""
+
diff --git a/searx/translations/es/LC_MESSAGES/messages.mo b/searx/translations/es/LC_MESSAGES/messages.mo
index 69c0fdfd8..2d0b16527 100644
--- a/searx/translations/es/LC_MESSAGES/messages.mo
+++ b/searx/translations/es/LC_MESSAGES/messages.mo
Binary files differ
diff --git a/searx/translations/es/LC_MESSAGES/messages.po b/searx/translations/es/LC_MESSAGES/messages.po
index bd9ecab46..f2a900953 100644
--- a/searx/translations/es/LC_MESSAGES/messages.po
+++ b/searx/translations/es/LC_MESSAGES/messages.po
@@ -1,149 +1,184 @@
-# English translations for .
+# English translations for PROJECT.
# Copyright (C) 2014 ORGANIZATION
-# This file is distributed under the same license as the project.
-#
+# This file is distributed under the same license as the PROJECT project.
+#
# Translators:
-# niazle, 2014
+# Alejandro León Aznar, 2014
msgid ""
msgstr ""
-"Project-Id-Version: searx\n"
+"Project-Id-Version: searx\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2014-03-18 17:10+0100\n"
-"PO-Revision-Date: 2014-03-04 20:40+0000\n"
-"Last-Translator: niazle\n"
-"Language-Team: Spanish "
-"(http://www.transifex.com/projects/p/searx/language/es/)\n"
-"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"POT-Creation-Date: 2014-09-07 21:47+0200\n"
+"PO-Revision-Date: 2014-09-08 11:01+0000\n"
+"Last-Translator: Alejandro León Aznar\n"
+"Language-Team: Spanish (http://www.transifex.com/projects/p/searx/language/es/)\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 1.3\n"
+"Language: es\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: searx/webapp.py:167
+#: searx/webapp.py:250
msgid "{minutes} minute(s) ago"
-msgstr ""
+msgstr "hace {minutes} minuto(s)"
-#: searx/webapp.py:169
+#: searx/webapp.py:252
msgid "{hours} hour(s), {minutes} minute(s) ago"
-msgstr ""
+msgstr "hace {hours} hora(s) y {minutes} minuto(s)"
-#: searx/engines/__init__.py:311
+#: searx/engines/__init__.py:164
msgid "Page loads (sec)"
msgstr "Tiempo de carga (segundos)"
-#: searx/engines/__init__.py:315
+#: searx/engines/__init__.py:168
msgid "Number of results"
msgstr "Número de resultados"
-#: searx/engines/__init__.py:319
+#: searx/engines/__init__.py:172
msgid "Scores"
msgstr "Puntuaciones"
-#: searx/engines/__init__.py:323
+#: searx/engines/__init__.py:176
msgid "Scores per result"
msgstr "Puntuaciones por resultado"
-#: searx/engines/__init__.py:327
+#: searx/engines/__init__.py:180
msgid "Errors"
msgstr "Errores"
-#: searx/templates/index.html:7
+#: searx/templates/courgette/index.html:8 searx/templates/default/index.html:8
msgid "about"
msgstr "acerca de"
-#: searx/templates/index.html:8
+#: searx/templates/courgette/index.html:9 searx/templates/default/index.html:9
msgid "preferences"
msgstr "preferencias"
-#: searx/templates/preferences.html:5
+#: searx/templates/courgette/preferences.html:5
+#: searx/templates/default/preferences.html:5
msgid "Preferences"
msgstr "Preferencias"
-#: searx/templates/preferences.html:9
+#: searx/templates/courgette/preferences.html:9
+#: searx/templates/default/preferences.html:9
msgid "Default categories"
msgstr "Categorías predeterminadas"
-#: searx/templates/preferences.html:15
+#: searx/templates/courgette/preferences.html:15
+#: searx/templates/default/preferences.html:15
msgid "Search language"
msgstr "Buscar idioma"
-#: searx/templates/preferences.html:18
+#: searx/templates/courgette/preferences.html:18
+#: searx/templates/default/preferences.html:18
msgid "Automatic"
msgstr "Automático"
-#: searx/templates/preferences.html:26
+#: searx/templates/courgette/preferences.html:26
+#: searx/templates/default/preferences.html:26
msgid "Interface language"
msgstr "Idioma de la interfaz"
-#: searx/templates/preferences.html:36
+#: searx/templates/courgette/preferences.html:36
+#: searx/templates/default/preferences.html:36
+msgid "Autocomplete"
+msgstr "Autocompletar"
+
+#: searx/templates/courgette/preferences.html:47
+#: searx/templates/default/preferences.html:47
+msgid "Method"
+msgstr "Método"
+
+#: searx/templates/courgette/preferences.html:56
+#: searx/templates/default/preferences.html:56
+msgid "Themes"
+msgstr "Temas"
+
+#: searx/templates/courgette/preferences.html:66
+#: searx/templates/default/preferences.html:66
msgid "Currently used search engines"
msgstr "Motores de búsqueda actualmente en uso"
-#: searx/templates/preferences.html:40
+#: searx/templates/courgette/preferences.html:70
+#: searx/templates/default/preferences.html:70
msgid "Engine name"
msgstr "Nombre del motor de búsqueda"
-#: searx/templates/preferences.html:41
+#: searx/templates/courgette/preferences.html:71
+#: searx/templates/default/preferences.html:71
msgid "Category"
msgstr "Categoría"
-#: searx/templates/preferences.html:42 searx/templates/preferences.html:53
+#: searx/templates/courgette/preferences.html:72
+#: searx/templates/courgette/preferences.html:83
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:83
msgid "Allow"
msgstr "Permitir"
-#: searx/templates/preferences.html:42 searx/templates/preferences.html:54
+#: searx/templates/courgette/preferences.html:72
+#: searx/templates/courgette/preferences.html:84
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:84
msgid "Block"
msgstr "Bloquear"
-#: searx/templates/preferences.html:62
+#: searx/templates/courgette/preferences.html:92
+#: searx/templates/default/preferences.html:92
msgid ""
-"These settings are stored in your cookies, this allows us not to store "
-"this data about you."
-msgstr ""
-"Esta configuración se guarda en sus cookies, lo que nos permite no "
-"almacenar dicha información sobre usted."
+"These settings are stored in your cookies, this allows us not to store this "
+"data about you."
+msgstr "Esta configuración se guarda en sus cookies, lo que nos permite no almacenar dicha información sobre usted."
-#: searx/templates/preferences.html:64
+#: searx/templates/courgette/preferences.html:94
+#: searx/templates/default/preferences.html:94
msgid ""
"These cookies serve your sole convenience, we don't use these cookies to "
"track you."
-msgstr ""
-"Estas cookies son para su propia comodidad, no las utilizamos para "
-"rastrearle."
+msgstr "Estas cookies son para su propia comodidad, no las utilizamos para rastrearle."
-#: searx/templates/preferences.html:67
+#: searx/templates/courgette/preferences.html:97
+#: searx/templates/default/preferences.html:97
msgid "save"
msgstr "Guardar"
-#: searx/templates/preferences.html:68
+#: searx/templates/courgette/preferences.html:98
+#: searx/templates/default/preferences.html:98
msgid "back"
msgstr "Atrás"
-#: searx/templates/results.html:11
-msgid "Suggestions"
-msgstr "Sugerencias"
-
-#: searx/templates/results.html:22
+#: searx/templates/courgette/results.html:12
+#: searx/templates/default/results.html:12
msgid "Search URL"
msgstr "Buscar URL"
-#: searx/templates/results.html:26
+#: searx/templates/courgette/results.html:16
+#: searx/templates/default/results.html:16
msgid "Download results"
msgstr "Descargar resultados"
-#: searx/templates/results.html:62
+#: searx/templates/courgette/results.html:34
+#: searx/templates/default/results.html:34
+msgid "Suggestions"
+msgstr "Sugerencias"
+
+#: searx/templates/courgette/results.html:62
+#: searx/templates/default/results.html:62
msgid "previous page"
msgstr "Página anterior"
-#: searx/templates/results.html:73
+#: searx/templates/courgette/results.html:73
+#: searx/templates/default/results.html:73
msgid "next page"
msgstr "Página siguiente"
-#: searx/templates/search.html:3
+#: searx/templates/courgette/search.html:3
+#: searx/templates/default/search.html:3
msgid "Search for..."
-msgstr ""
+msgstr "Buscar..."
-#: searx/templates/stats.html:4
+#: searx/templates/courgette/stats.html:4 searx/templates/default/stats.html:4
msgid "Engine stats"
msgstr "Estadísticas del motor de búsqueda"
@@ -173,3 +208,5 @@ msgstr "TIC"
msgid "news"
msgstr "noticias"
+msgid "map"
+msgstr "mapa"
diff --git a/searx/translations/fr/LC_MESSAGES/messages.mo b/searx/translations/fr/LC_MESSAGES/messages.mo
index 09022d0c9..7171b9af0 100644
--- a/searx/translations/fr/LC_MESSAGES/messages.mo
+++ b/searx/translations/fr/LC_MESSAGES/messages.mo
Binary files differ
diff --git a/searx/translations/fr/LC_MESSAGES/messages.po b/searx/translations/fr/LC_MESSAGES/messages.po
index 37dc5e47f..a52f4c11a 100644
--- a/searx/translations/fr/LC_MESSAGES/messages.po
+++ b/searx/translations/fr/LC_MESSAGES/messages.po
@@ -1,151 +1,186 @@
-# English translations for .
+# English translations for PROJECT.
# Copyright (C) 2014 ORGANIZATION
-# This file is distributed under the same license as the project.
-#
+# This file is distributed under the same license as the PROJECT project.
+#
# Translators:
# Benjamin Sonntag <benjamin@sonntag.fr>, 2014
# FIRST AUTHOR <EMAIL@ADDRESS>, 2014
-# rike <u@451f.org>, 2014
+# rike, 2014
msgid ""
msgstr ""
-"Project-Id-Version: searx\n"
+"Project-Id-Version: searx\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2014-03-18 17:10+0100\n"
-"PO-Revision-Date: 2014-03-16 07:40+0000\n"
-"Last-Translator: Benjamin Sonntag <benjamin@sonntag.fr>\n"
-"Language-Team: French "
-"(http://www.transifex.com/projects/p/searx/language/fr/)\n"
-"Plural-Forms: nplurals=2; plural=(n > 1)\n"
+"POT-Creation-Date: 2014-09-07 21:47+0200\n"
+"PO-Revision-Date: 2014-09-07 21:24+0000\n"
+"Last-Translator: Adam Tauber <asciimoo@gmail.com>\n"
+"Language-Team: French (http://www.transifex.com/projects/p/searx/language/fr/)\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 1.3\n"
+"Language: fr\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-#: searx/webapp.py:167
+#: searx/webapp.py:250
msgid "{minutes} minute(s) ago"
-msgstr ""
+msgstr "il y a {minutes} minute(s)"
-#: searx/webapp.py:169
+#: searx/webapp.py:252
msgid "{hours} hour(s), {minutes} minute(s) ago"
-msgstr ""
+msgstr "il y a {hours} heure(s), {minutes} minute(s)"
-#: searx/engines/__init__.py:311
+#: searx/engines/__init__.py:164
msgid "Page loads (sec)"
msgstr "Chargement de la page (sec)"
-#: searx/engines/__init__.py:315
+#: searx/engines/__init__.py:168
msgid "Number of results"
msgstr "Nombre de résultats"
-#: searx/engines/__init__.py:319
+#: searx/engines/__init__.py:172
msgid "Scores"
msgstr "Score"
-#: searx/engines/__init__.py:323
+#: searx/engines/__init__.py:176
msgid "Scores per result"
msgstr "Score par résultat"
-#: searx/engines/__init__.py:327
+#: searx/engines/__init__.py:180
msgid "Errors"
msgstr "Erreurs"
-#: searx/templates/index.html:7
+#: searx/templates/courgette/index.html:8 searx/templates/default/index.html:8
msgid "about"
msgstr "À propos"
-#: searx/templates/index.html:8
+#: searx/templates/courgette/index.html:9 searx/templates/default/index.html:9
msgid "preferences"
msgstr "préférences"
-#: searx/templates/preferences.html:5
+#: searx/templates/courgette/preferences.html:5
+#: searx/templates/default/preferences.html:5
msgid "Preferences"
msgstr "Préférences"
-#: searx/templates/preferences.html:9
+#: searx/templates/courgette/preferences.html:9
+#: searx/templates/default/preferences.html:9
msgid "Default categories"
msgstr "Catégories par défaut"
-#: searx/templates/preferences.html:15
+#: searx/templates/courgette/preferences.html:15
+#: searx/templates/default/preferences.html:15
msgid "Search language"
msgstr "Langue de recherche"
-#: searx/templates/preferences.html:18
+#: searx/templates/courgette/preferences.html:18
+#: searx/templates/default/preferences.html:18
msgid "Automatic"
msgstr "Automatique"
-#: searx/templates/preferences.html:26
+#: searx/templates/courgette/preferences.html:26
+#: searx/templates/default/preferences.html:26
msgid "Interface language"
msgstr "Langue de l'interface"
-#: searx/templates/preferences.html:36
+#: searx/templates/courgette/preferences.html:36
+#: searx/templates/default/preferences.html:36
+msgid "Autocomplete"
+msgstr ""
+
+#: searx/templates/courgette/preferences.html:47
+#: searx/templates/default/preferences.html:47
+msgid "Method"
+msgstr ""
+
+#: searx/templates/courgette/preferences.html:56
+#: searx/templates/default/preferences.html:56
+msgid "Themes"
+msgstr ""
+
+#: searx/templates/courgette/preferences.html:66
+#: searx/templates/default/preferences.html:66
msgid "Currently used search engines"
-msgstr "Moteurs actuellement utilisés"
+msgstr "Moteurs de recherche actuellement utilisés"
-#: searx/templates/preferences.html:40
+#: searx/templates/courgette/preferences.html:70
+#: searx/templates/default/preferences.html:70
msgid "Engine name"
msgstr "Nom du moteur"
-#: searx/templates/preferences.html:41
+#: searx/templates/courgette/preferences.html:71
+#: searx/templates/default/preferences.html:71
msgid "Category"
msgstr "Catégorie"
-#: searx/templates/preferences.html:42 searx/templates/preferences.html:53
+#: searx/templates/courgette/preferences.html:72
+#: searx/templates/courgette/preferences.html:83
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:83
msgid "Allow"
msgstr "Autoriser"
-#: searx/templates/preferences.html:42 searx/templates/preferences.html:54
+#: searx/templates/courgette/preferences.html:72
+#: searx/templates/courgette/preferences.html:84
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:84
msgid "Block"
msgstr "Bloquer"
-#: searx/templates/preferences.html:62
+#: searx/templates/courgette/preferences.html:92
+#: searx/templates/default/preferences.html:92
msgid ""
-"These settings are stored in your cookies, this allows us not to store "
-"this data about you."
-msgstr ""
-"Ces paramètres sont stockés dans vos cookies ; ceci nous permet de ne pas"
-" collecter vos données."
+"These settings are stored in your cookies, this allows us not to store this "
+"data about you."
+msgstr "Ces paramètres sont stockés dans vos cookies ; ceci nous permet de ne pas collecter vos données."
-#: searx/templates/preferences.html:64
+#: searx/templates/courgette/preferences.html:94
+#: searx/templates/default/preferences.html:94
msgid ""
"These cookies serve your sole convenience, we don't use these cookies to "
"track you."
-msgstr ""
-"Ces cookies existent pour votre confort d'utilisation, nous ne les "
-"utilisons pas pour vous espionner."
+msgstr "Ces cookies existent pour votre confort d'utilisation, nous ne les utilisons pas pour vous espionner."
-#: searx/templates/preferences.html:67
+#: searx/templates/courgette/preferences.html:97
+#: searx/templates/default/preferences.html:97
msgid "save"
msgstr "enregistrer"
-#: searx/templates/preferences.html:68
+#: searx/templates/courgette/preferences.html:98
+#: searx/templates/default/preferences.html:98
msgid "back"
msgstr "retour"
-#: searx/templates/results.html:11
-msgid "Suggestions"
-msgstr "Suggestions"
-
-#: searx/templates/results.html:22
+#: searx/templates/courgette/results.html:12
+#: searx/templates/default/results.html:12
msgid "Search URL"
msgstr "URL de recherche"
-#: searx/templates/results.html:26
+#: searx/templates/courgette/results.html:16
+#: searx/templates/default/results.html:16
msgid "Download results"
msgstr "Télécharger les résultats"
-#: searx/templates/results.html:62
+#: searx/templates/courgette/results.html:34
+#: searx/templates/default/results.html:34
+msgid "Suggestions"
+msgstr "Suggestions"
+
+#: searx/templates/courgette/results.html:62
+#: searx/templates/default/results.html:62
msgid "previous page"
msgstr "page précédente"
-#: searx/templates/results.html:73
+#: searx/templates/courgette/results.html:73
+#: searx/templates/default/results.html:73
msgid "next page"
msgstr "page suivante"
-#: searx/templates/search.html:3
+#: searx/templates/courgette/search.html:3
+#: searx/templates/default/search.html:3
msgid "Search for..."
msgstr "Rechercher..."
-#: searx/templates/stats.html:4
+#: searx/templates/courgette/stats.html:4 searx/templates/default/stats.html:4
msgid "Engine stats"
msgstr "Statistiques du moteur"
@@ -175,3 +210,5 @@ msgstr "Informatique"
msgid "news"
msgstr "actus"
+msgid "map"
+msgstr ""
diff --git a/searx/translations/hu/LC_MESSAGES/messages.mo b/searx/translations/hu/LC_MESSAGES/messages.mo
index 64beee1af..a60b3ee22 100644
--- a/searx/translations/hu/LC_MESSAGES/messages.mo
+++ b/searx/translations/hu/LC_MESSAGES/messages.mo
Binary files differ
diff --git a/searx/translations/hu/LC_MESSAGES/messages.po b/searx/translations/hu/LC_MESSAGES/messages.po
index 52fd2ee95..c34e56db9 100644
--- a/searx/translations/hu/LC_MESSAGES/messages.po
+++ b/searx/translations/hu/LC_MESSAGES/messages.po
@@ -1,145 +1,185 @@
-# Hungarian translations for PROJECT.
+# English translations for PROJECT.
# Copyright (C) 2014 ORGANIZATION
# This file is distributed under the same license as the PROJECT project.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
-#
+#
+# Translators:
+# Adam Tauber <asciimoo@gmail.com>, 2014
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2014
msgid ""
msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
+"Project-Id-Version: searx\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2014-03-18 17:10+0100\n"
-"PO-Revision-Date: 2014-01-21 23:33+0100\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: hu <LL@li.org>\n"
-"Plural-Forms: nplurals=1; plural=0\n"
+"POT-Creation-Date: 2014-09-07 21:47+0200\n"
+"PO-Revision-Date: 2014-09-07 21:30+0000\n"
+"Last-Translator: Adam Tauber <asciimoo@gmail.com>\n"
+"Language-Team: Hungarian (http://www.transifex.com/projects/p/searx/language/hu/)\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 1.3\n"
+"Language: hu\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: searx/webapp.py:167
+#: searx/webapp.py:250
msgid "{minutes} minute(s) ago"
msgstr "{minutes} perce"
-#: searx/webapp.py:169
+#: searx/webapp.py:252
msgid "{hours} hour(s), {minutes} minute(s) ago"
msgstr "{hours} óra, {minutes} perce"
-#: searx/engines/__init__.py:311
+#: searx/engines/__init__.py:164
msgid "Page loads (sec)"
msgstr "Válaszidők (sec)"
-#: searx/engines/__init__.py:315
+#: searx/engines/__init__.py:168
msgid "Number of results"
msgstr "Találatok száma"
-#: searx/engines/__init__.py:319
+#: searx/engines/__init__.py:172
msgid "Scores"
msgstr "Pontszámok"
-#: searx/engines/__init__.py:323
+#: searx/engines/__init__.py:176
msgid "Scores per result"
msgstr "Pontszámok találatonként"
-#: searx/engines/__init__.py:327
+#: searx/engines/__init__.py:180
msgid "Errors"
msgstr "Hibák"
-#: searx/templates/index.html:7
+#: searx/templates/courgette/index.html:8 searx/templates/default/index.html:8
msgid "about"
msgstr "rólunk"
-#: searx/templates/index.html:8
+#: searx/templates/courgette/index.html:9 searx/templates/default/index.html:9
msgid "preferences"
msgstr "beállítások"
-#: searx/templates/preferences.html:5
+#: searx/templates/courgette/preferences.html:5
+#: searx/templates/default/preferences.html:5
msgid "Preferences"
msgstr "Beállítások"
-#: searx/templates/preferences.html:9
+#: searx/templates/courgette/preferences.html:9
+#: searx/templates/default/preferences.html:9
msgid "Default categories"
msgstr "Alapértelmezett kategóriák"
-#: searx/templates/preferences.html:15
+#: searx/templates/courgette/preferences.html:15
+#: searx/templates/default/preferences.html:15
msgid "Search language"
msgstr "Keresés nyelve"
-#: searx/templates/preferences.html:18
+#: searx/templates/courgette/preferences.html:18
+#: searx/templates/default/preferences.html:18
msgid "Automatic"
msgstr "Automatikus"
-#: searx/templates/preferences.html:26
+#: searx/templates/courgette/preferences.html:26
+#: searx/templates/default/preferences.html:26
msgid "Interface language"
msgstr "Felület nyelve"
-#: searx/templates/preferences.html:36
+#: searx/templates/courgette/preferences.html:36
+#: searx/templates/default/preferences.html:36
+msgid "Autocomplete"
+msgstr "Automatikus kiegészítés"
+
+#: searx/templates/courgette/preferences.html:47
+#: searx/templates/default/preferences.html:47
+msgid "Method"
+msgstr "Method"
+
+#: searx/templates/courgette/preferences.html:56
+#: searx/templates/default/preferences.html:56
+msgid "Themes"
+msgstr "Megjelenés"
+
+#: searx/templates/courgette/preferences.html:66
+#: searx/templates/default/preferences.html:66
msgid "Currently used search engines"
msgstr "Jelenleg használt keresők"
-#: searx/templates/preferences.html:40
+#: searx/templates/courgette/preferences.html:70
+#: searx/templates/default/preferences.html:70
msgid "Engine name"
msgstr "Kereső neve"
-#: searx/templates/preferences.html:41
+#: searx/templates/courgette/preferences.html:71
+#: searx/templates/default/preferences.html:71
msgid "Category"
msgstr "Kategória"
-#: searx/templates/preferences.html:42 searx/templates/preferences.html:53
+#: searx/templates/courgette/preferences.html:72
+#: searx/templates/courgette/preferences.html:83
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:83
msgid "Allow"
msgstr "Engedélyezés"
-#: searx/templates/preferences.html:42 searx/templates/preferences.html:54
+#: searx/templates/courgette/preferences.html:72
+#: searx/templates/courgette/preferences.html:84
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:84
msgid "Block"
msgstr "Tiltás"
-#: searx/templates/preferences.html:62
+#: searx/templates/courgette/preferences.html:92
+#: searx/templates/default/preferences.html:92
msgid ""
-"These settings are stored in your cookies, this allows us not to store "
-"this data about you."
+"These settings are stored in your cookies, this allows us not to store this "
+"data about you."
msgstr "Ezek a beállítások csak a böngésző cookie-jaiban tárolódnak."
-#: searx/templates/preferences.html:64
+#: searx/templates/courgette/preferences.html:94
+#: searx/templates/default/preferences.html:94
msgid ""
"These cookies serve your sole convenience, we don't use these cookies to "
"track you."
-msgstr ""
-"Ezek a cookie-k csak kényelmi funkciókat látnak el, nem használjuk a "
-"felhasználók követésére."
+msgstr "Ezek a cookie-k csak kényelmi funkciókat látnak el, nem használjuk a felhasználók követésére."
-#: searx/templates/preferences.html:67
+#: searx/templates/courgette/preferences.html:97
+#: searx/templates/default/preferences.html:97
msgid "save"
msgstr "mentés"
-#: searx/templates/preferences.html:68
+#: searx/templates/courgette/preferences.html:98
+#: searx/templates/default/preferences.html:98
msgid "back"
msgstr "vissza"
-#: searx/templates/results.html:11
-msgid "Suggestions"
-msgstr "Javaslatok"
-
-#: searx/templates/results.html:22
+#: searx/templates/courgette/results.html:12
+#: searx/templates/default/results.html:12
msgid "Search URL"
msgstr "Keresési URL"
-#: searx/templates/results.html:26
+#: searx/templates/courgette/results.html:16
+#: searx/templates/default/results.html:16
msgid "Download results"
msgstr "Találatok letöltése"
-#: searx/templates/results.html:62
+#: searx/templates/courgette/results.html:34
+#: searx/templates/default/results.html:34
+msgid "Suggestions"
+msgstr "Javaslatok"
+
+#: searx/templates/courgette/results.html:62
+#: searx/templates/default/results.html:62
msgid "previous page"
msgstr "előző oldal"
-#: searx/templates/results.html:73
+#: searx/templates/courgette/results.html:73
+#: searx/templates/default/results.html:73
msgid "next page"
msgstr "következő oldal"
-#: searx/templates/search.html:3
+#: searx/templates/courgette/search.html:3
+#: searx/templates/default/search.html:3
msgid "Search for..."
msgstr "Keresés..."
-#: searx/templates/stats.html:4
+#: searx/templates/courgette/stats.html:4 searx/templates/default/stats.html:4
msgid "Engine stats"
msgstr "Kereső statisztikák"
@@ -169,3 +209,5 @@ msgstr "it"
msgid "news"
msgstr "hírek"
+msgid "map"
+msgstr "térkép"
diff --git a/searx/translations/it/LC_MESSAGES/messages.mo b/searx/translations/it/LC_MESSAGES/messages.mo
index ffd0dc9e5..77b5503d0 100644
--- a/searx/translations/it/LC_MESSAGES/messages.mo
+++ b/searx/translations/it/LC_MESSAGES/messages.mo
Binary files differ
diff --git a/searx/translations/it/LC_MESSAGES/messages.po b/searx/translations/it/LC_MESSAGES/messages.po
index b83ef440d..4eeb15fa4 100644
--- a/searx/translations/it/LC_MESSAGES/messages.po
+++ b/searx/translations/it/LC_MESSAGES/messages.po
@@ -1,149 +1,184 @@
-# English translations for .
+# English translations for PROJECT.
# Copyright (C) 2014 ORGANIZATION
-# This file is distributed under the same license as the project.
-#
+# This file is distributed under the same license as the PROJECT project.
+#
# Translators:
# dp <d.pitrolo@gmx.com>, 2014
msgid ""
msgstr ""
-"Project-Id-Version: searx\n"
+"Project-Id-Version: searx\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2014-03-18 17:10+0100\n"
-"PO-Revision-Date: 2014-03-05 13:30+0000\n"
+"POT-Creation-Date: 2014-09-07 21:47+0200\n"
+"PO-Revision-Date: 2014-09-08 08:19+0000\n"
"Last-Translator: dp <d.pitrolo@gmx.com>\n"
-"Language-Team: Italian "
-"(http://www.transifex.com/projects/p/searx/language/it/)\n"
-"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"Language-Team: Italian (http://www.transifex.com/projects/p/searx/language/it/)\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 1.3\n"
+"Language: it\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: searx/webapp.py:167
+#: searx/webapp.py:250
msgid "{minutes} minute(s) ago"
-msgstr ""
+msgstr "di {minutes} minuti fa"
-#: searx/webapp.py:169
+#: searx/webapp.py:252
msgid "{hours} hour(s), {minutes} minute(s) ago"
-msgstr ""
+msgstr "di {ore} h e {minutes} minuti fa"
-#: searx/engines/__init__.py:311
+#: searx/engines/__init__.py:164
msgid "Page loads (sec)"
msgstr " Caricamento della pagina (secondi)"
-#: searx/engines/__init__.py:315
+#: searx/engines/__init__.py:168
msgid "Number of results"
msgstr "Risultati ottenuti"
-#: searx/engines/__init__.py:319
+#: searx/engines/__init__.py:172
msgid "Scores"
msgstr "Punteggio"
-#: searx/engines/__init__.py:323
+#: searx/engines/__init__.py:176
msgid "Scores per result"
msgstr "Punteggio per risultato"
-#: searx/engines/__init__.py:327
+#: searx/engines/__init__.py:180
msgid "Errors"
msgstr "Errori"
-#: searx/templates/index.html:7
+#: searx/templates/courgette/index.html:8 searx/templates/default/index.html:8
msgid "about"
msgstr "informazioni"
-#: searx/templates/index.html:8
+#: searx/templates/courgette/index.html:9 searx/templates/default/index.html:9
msgid "preferences"
msgstr "preferenze"
-#: searx/templates/preferences.html:5
+#: searx/templates/courgette/preferences.html:5
+#: searx/templates/default/preferences.html:5
msgid "Preferences"
msgstr "Preferenze"
-#: searx/templates/preferences.html:9
+#: searx/templates/courgette/preferences.html:9
+#: searx/templates/default/preferences.html:9
msgid "Default categories"
msgstr "Categorie predefinite"
-#: searx/templates/preferences.html:15
+#: searx/templates/courgette/preferences.html:15
+#: searx/templates/default/preferences.html:15
msgid "Search language"
msgstr "Lingua di ricerca"
-#: searx/templates/preferences.html:18
+#: searx/templates/courgette/preferences.html:18
+#: searx/templates/default/preferences.html:18
msgid "Automatic"
msgstr "Automatico"
-#: searx/templates/preferences.html:26
+#: searx/templates/courgette/preferences.html:26
+#: searx/templates/default/preferences.html:26
msgid "Interface language"
msgstr "Linguaggio dell'interfaccia"
-#: searx/templates/preferences.html:36
+#: searx/templates/courgette/preferences.html:36
+#: searx/templates/default/preferences.html:36
+msgid "Autocomplete"
+msgstr "Completamento automatico"
+
+#: searx/templates/courgette/preferences.html:47
+#: searx/templates/default/preferences.html:47
+msgid "Method"
+msgstr "Metodo"
+
+#: searx/templates/courgette/preferences.html:56
+#: searx/templates/default/preferences.html:56
+msgid "Themes"
+msgstr "Grafica"
+
+#: searx/templates/courgette/preferences.html:66
+#: searx/templates/default/preferences.html:66
msgid "Currently used search engines"
msgstr "Motori di ricerca attualmente in uso"
-#: searx/templates/preferences.html:40
+#: searx/templates/courgette/preferences.html:70
+#: searx/templates/default/preferences.html:70
msgid "Engine name"
msgstr "Nome del motore"
-#: searx/templates/preferences.html:41
+#: searx/templates/courgette/preferences.html:71
+#: searx/templates/default/preferences.html:71
msgid "Category"
msgstr "Categoria"
-#: searx/templates/preferences.html:42 searx/templates/preferences.html:53
+#: searx/templates/courgette/preferences.html:72
+#: searx/templates/courgette/preferences.html:83
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:83
msgid "Allow"
msgstr "Autorizza"
-#: searx/templates/preferences.html:42 searx/templates/preferences.html:54
+#: searx/templates/courgette/preferences.html:72
+#: searx/templates/courgette/preferences.html:84
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:84
msgid "Block"
msgstr "Blocca"
-#: searx/templates/preferences.html:62
+#: searx/templates/courgette/preferences.html:92
+#: searx/templates/default/preferences.html:92
msgid ""
-"These settings are stored in your cookies, this allows us not to store "
-"this data about you."
-msgstr ""
-"Queste impostazioni sono salvate nei tuoi cookie, consentendoci di non "
-"conservare dati su di te."
+"These settings are stored in your cookies, this allows us not to store this "
+"data about you."
+msgstr "Queste impostazioni sono salvate nei tuoi cookie, consentendoci di non conservare dati su di te."
-#: searx/templates/preferences.html:64
+#: searx/templates/courgette/preferences.html:94
+#: searx/templates/default/preferences.html:94
msgid ""
"These cookies serve your sole convenience, we don't use these cookies to "
"track you."
-msgstr ""
-"I cookie sono funzionali ad un servizio migliore. Non usiamo i cookie per"
-" sorvegliarti."
+msgstr "I cookie sono funzionali ad un servizio migliore. Non usiamo i cookie per sorvegliarti."
-#: searx/templates/preferences.html:67
+#: searx/templates/courgette/preferences.html:97
+#: searx/templates/default/preferences.html:97
msgid "save"
msgstr "salva"
-#: searx/templates/preferences.html:68
+#: searx/templates/courgette/preferences.html:98
+#: searx/templates/default/preferences.html:98
msgid "back"
msgstr "indietro"
-#: searx/templates/results.html:11
-msgid "Suggestions"
-msgstr "Suggerimenti"
-
-#: searx/templates/results.html:22
+#: searx/templates/courgette/results.html:12
+#: searx/templates/default/results.html:12
msgid "Search URL"
msgstr "URL della ricerca"
-#: searx/templates/results.html:26
+#: searx/templates/courgette/results.html:16
+#: searx/templates/default/results.html:16
msgid "Download results"
msgstr "Scarica i risultati"
-#: searx/templates/results.html:62
+#: searx/templates/courgette/results.html:34
+#: searx/templates/default/results.html:34
+msgid "Suggestions"
+msgstr "Suggerimenti"
+
+#: searx/templates/courgette/results.html:62
+#: searx/templates/default/results.html:62
msgid "previous page"
msgstr "pagina precedente"
-#: searx/templates/results.html:73
+#: searx/templates/courgette/results.html:73
+#: searx/templates/default/results.html:73
msgid "next page"
msgstr "pagina successiva"
-#: searx/templates/search.html:3
+#: searx/templates/courgette/search.html:3
+#: searx/templates/default/search.html:3
msgid "Search for..."
-msgstr ""
+msgstr "Cerca…"
-#: searx/templates/stats.html:4
+#: searx/templates/courgette/stats.html:4 searx/templates/default/stats.html:4
msgid "Engine stats"
msgstr "Statistiche dei motori"
@@ -173,3 +208,5 @@ msgstr "it"
msgid "news"
msgstr "notizie"
+msgid "map"
+msgstr "mappe"
diff --git a/searx/translations/ja/LC_MESSAGES/messages.mo b/searx/translations/ja/LC_MESSAGES/messages.mo
new file mode 100644
index 000000000..d91b5b1da
--- /dev/null
+++ b/searx/translations/ja/LC_MESSAGES/messages.mo
Binary files differ
diff --git a/searx/translations/ja/LC_MESSAGES/messages.po b/searx/translations/ja/LC_MESSAGES/messages.po
new file mode 100644
index 000000000..510a77eae
--- /dev/null
+++ b/searx/translations/ja/LC_MESSAGES/messages.po
@@ -0,0 +1,215 @@
+# Japanese translations for PROJECT.
+# Copyright (C) 2014 ORGANIZATION
+# This file is distributed under the same license as the PROJECT project.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2014-10-05 16:45+0200\n"
+"PO-Revision-Date: 2014-10-05 16:38+0200\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: ja <LL@li.org>\n"
+"Plural-Forms: nplurals=1; plural=0\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 1.3\n"
+
+#: searx/webapp.py:251
+msgid "{minutes} minute(s) ago"
+msgstr ""
+
+#: searx/webapp.py:253
+msgid "{hours} hour(s), {minutes} minute(s) ago"
+msgstr ""
+
+#: searx/engines/__init__.py:176
+msgid "Page loads (sec)"
+msgstr ""
+
+#: searx/engines/__init__.py:180
+msgid "Number of results"
+msgstr ""
+
+#: searx/engines/__init__.py:184
+msgid "Scores"
+msgstr ""
+
+#: searx/engines/__init__.py:188
+msgid "Scores per result"
+msgstr ""
+
+#: searx/engines/__init__.py:192
+msgid "Errors"
+msgstr ""
+
+#: searx/templates/courgette/index.html:8 searx/templates/default/index.html:8
+msgid "about"
+msgstr "に関する"
+
+#: searx/templates/courgette/index.html:9 searx/templates/default/index.html:9
+msgid "preferences"
+msgstr "設定"
+
+#: searx/templates/courgette/preferences.html:5
+#: searx/templates/default/preferences.html:5
+msgid "Preferences"
+msgstr "設定"
+
+#: searx/templates/courgette/preferences.html:9
+#: searx/templates/default/preferences.html:9
+msgid "Default categories"
+msgstr ""
+
+#: searx/templates/courgette/preferences.html:15
+#: searx/templates/default/preferences.html:15
+msgid "Search language"
+msgstr ""
+
+#: searx/templates/courgette/preferences.html:18
+#: searx/templates/default/preferences.html:18
+msgid "Automatic"
+msgstr ""
+
+#: searx/templates/courgette/preferences.html:26
+#: searx/templates/default/preferences.html:26
+msgid "Interface language"
+msgstr ""
+
+#: searx/templates/courgette/preferences.html:36
+#: searx/templates/default/preferences.html:36
+msgid "Autocomplete"
+msgstr ""
+
+#: searx/templates/courgette/preferences.html:47
+#: searx/templates/default/preferences.html:47
+msgid "Method"
+msgstr ""
+
+#: searx/templates/courgette/preferences.html:56
+#: searx/templates/default/preferences.html:56
+msgid "Themes"
+msgstr ""
+
+#: searx/templates/courgette/preferences.html:66
+#: searx/templates/default/preferences.html:66
+msgid "Currently used search engines"
+msgstr ""
+
+#: searx/templates/courgette/preferences.html:70
+#: searx/templates/default/preferences.html:70
+msgid "Engine name"
+msgstr ""
+
+#: searx/templates/courgette/preferences.html:71
+#: searx/templates/default/preferences.html:71
+msgid "Category"
+msgstr ""
+
+#: searx/templates/courgette/preferences.html:72
+#: searx/templates/courgette/preferences.html:83
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:83
+msgid "Allow"
+msgstr ""
+
+#: searx/templates/courgette/preferences.html:72
+#: searx/templates/courgette/preferences.html:84
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:84
+msgid "Block"
+msgstr ""
+
+#: searx/templates/courgette/preferences.html:92
+#: searx/templates/default/preferences.html:92
+msgid ""
+"These settings are stored in your cookies, this allows us not to store "
+"this data about you."
+msgstr ""
+
+#: searx/templates/courgette/preferences.html:94
+#: searx/templates/default/preferences.html:94
+msgid ""
+"These cookies serve your sole convenience, we don't use these cookies to "
+"track you."
+msgstr ""
+
+#: searx/templates/courgette/preferences.html:97
+#: searx/templates/default/preferences.html:97
+msgid "save"
+msgstr ""
+
+#: searx/templates/courgette/preferences.html:98
+#: searx/templates/default/preferences.html:98
+msgid "back"
+msgstr ""
+
+#: searx/templates/courgette/results.html:12
+#: searx/templates/default/results.html:12
+msgid "Search URL"
+msgstr ""
+
+#: searx/templates/courgette/results.html:16
+#: searx/templates/default/results.html:16
+msgid "Download results"
+msgstr ""
+
+#: searx/templates/courgette/results.html:34
+#: searx/templates/default/results.html:42
+msgid "Suggestions"
+msgstr "提案"
+
+#: searx/templates/courgette/results.html:62
+#: searx/templates/default/results.html:78
+msgid "previous page"
+msgstr "前のページ"
+
+#: searx/templates/courgette/results.html:73
+#: searx/templates/default/results.html:89
+msgid "next page"
+msgstr "次のページ"
+
+#: searx/templates/courgette/search.html:3
+#: searx/templates/default/search.html:3
+msgid "Search for..."
+msgstr "検索する..."
+
+#: searx/templates/courgette/stats.html:4 searx/templates/default/stats.html:4
+msgid "Engine stats"
+msgstr ""
+
+#: searx/templates/default/results.html:34
+msgid "Answers"
+msgstr ""
+
+# categories - manually added
+# TODO - automatically add
+msgid "files"
+msgstr "ファイル"
+
+msgid "general"
+msgstr "ウェブ"
+
+msgid "map"
+msgstr "地図"
+
+msgid "music"
+msgstr "音楽"
+
+msgid "social media"
+msgstr "ソーシャルメディア"
+
+msgid "images"
+msgstr "画像"
+
+msgid "videos"
+msgstr "動画"
+
+msgid "it"
+msgstr "情報技術"
+
+msgid "news"
+msgstr "ニュース"
+
diff --git a/searx/translations/nl/LC_MESSAGES/messages.mo b/searx/translations/nl/LC_MESSAGES/messages.mo
index 6f456e165..2d55fb352 100644
--- a/searx/translations/nl/LC_MESSAGES/messages.mo
+++ b/searx/translations/nl/LC_MESSAGES/messages.mo
Binary files differ
diff --git a/searx/translations/nl/LC_MESSAGES/messages.po b/searx/translations/nl/LC_MESSAGES/messages.po
index 78d848387..46c975c77 100644
--- a/searx/translations/nl/LC_MESSAGES/messages.po
+++ b/searx/translations/nl/LC_MESSAGES/messages.po
@@ -1,149 +1,184 @@
-# English translations for .
+# English translations for PROJECT.
# Copyright (C) 2014 ORGANIZATION
-# This file is distributed under the same license as the project.
-#
+# This file is distributed under the same license as the PROJECT project.
+#
# Translators:
# André Koot <meneer@tken.net>, 2014
msgid ""
msgstr ""
-"Project-Id-Version: searx\n"
+"Project-Id-Version: searx\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2014-03-18 17:10+0100\n"
-"PO-Revision-Date: 2014-03-15 20:20+0000\n"
+"POT-Creation-Date: 2014-09-07 21:47+0200\n"
+"PO-Revision-Date: 2014-09-09 15:33+0000\n"
"Last-Translator: André Koot <meneer@tken.net>\n"
-"Language-Team: Dutch "
-"(http://www.transifex.com/projects/p/searx/language/nl/)\n"
-"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"Language-Team: Dutch (http://www.transifex.com/projects/p/searx/language/nl/)\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 1.3\n"
+"Language: nl\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: searx/webapp.py:167
+#: searx/webapp.py:250
msgid "{minutes} minute(s) ago"
-msgstr ""
+msgstr "{minutes} min geleden"
-#: searx/webapp.py:169
+#: searx/webapp.py:252
msgid "{hours} hour(s), {minutes} minute(s) ago"
-msgstr ""
+msgstr "{hours} uur, {minutes} min geleden"
-#: searx/engines/__init__.py:311
+#: searx/engines/__init__.py:164
msgid "Page loads (sec)"
msgstr "Pagina laadt (sec)"
-#: searx/engines/__init__.py:315
+#: searx/engines/__init__.py:168
msgid "Number of results"
msgstr "Aantal zoekresultaten"
-#: searx/engines/__init__.py:319
+#: searx/engines/__init__.py:172
msgid "Scores"
msgstr "Scores"
-#: searx/engines/__init__.py:323
+#: searx/engines/__init__.py:176
msgid "Scores per result"
msgstr "Scores per zoekresultaat"
-#: searx/engines/__init__.py:327
+#: searx/engines/__init__.py:180
msgid "Errors"
msgstr "Fouten"
-#: searx/templates/index.html:7
+#: searx/templates/courgette/index.html:8 searx/templates/default/index.html:8
msgid "about"
msgstr "over"
-#: searx/templates/index.html:8
+#: searx/templates/courgette/index.html:9 searx/templates/default/index.html:9
msgid "preferences"
msgstr "voorkeuren"
-#: searx/templates/preferences.html:5
+#: searx/templates/courgette/preferences.html:5
+#: searx/templates/default/preferences.html:5
msgid "Preferences"
msgstr "Voorkeuren"
-#: searx/templates/preferences.html:9
+#: searx/templates/courgette/preferences.html:9
+#: searx/templates/default/preferences.html:9
msgid "Default categories"
msgstr "Standaardcategorieën"
-#: searx/templates/preferences.html:15
+#: searx/templates/courgette/preferences.html:15
+#: searx/templates/default/preferences.html:15
msgid "Search language"
msgstr "Zoektaal"
-#: searx/templates/preferences.html:18
+#: searx/templates/courgette/preferences.html:18
+#: searx/templates/default/preferences.html:18
msgid "Automatic"
msgstr "Automatisch"
-#: searx/templates/preferences.html:26
+#: searx/templates/courgette/preferences.html:26
+#: searx/templates/default/preferences.html:26
msgid "Interface language"
msgstr "Interfacetaal"
-#: searx/templates/preferences.html:36
+#: searx/templates/courgette/preferences.html:36
+#: searx/templates/default/preferences.html:36
+msgid "Autocomplete"
+msgstr "Auto-aanvullen"
+
+#: searx/templates/courgette/preferences.html:47
+#: searx/templates/default/preferences.html:47
+msgid "Method"
+msgstr "Methode"
+
+#: searx/templates/courgette/preferences.html:56
+#: searx/templates/default/preferences.html:56
+msgid "Themes"
+msgstr "Thema's"
+
+#: searx/templates/courgette/preferences.html:66
+#: searx/templates/default/preferences.html:66
msgid "Currently used search engines"
msgstr "Momenteel gebruikte zoekmachines"
-#: searx/templates/preferences.html:40
+#: searx/templates/courgette/preferences.html:70
+#: searx/templates/default/preferences.html:70
msgid "Engine name"
msgstr "Naam zoekmachine"
-#: searx/templates/preferences.html:41
+#: searx/templates/courgette/preferences.html:71
+#: searx/templates/default/preferences.html:71
msgid "Category"
msgstr "Categorie"
-#: searx/templates/preferences.html:42 searx/templates/preferences.html:53
+#: searx/templates/courgette/preferences.html:72
+#: searx/templates/courgette/preferences.html:83
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:83
msgid "Allow"
msgstr "Toestaan"
-#: searx/templates/preferences.html:42 searx/templates/preferences.html:54
+#: searx/templates/courgette/preferences.html:72
+#: searx/templates/courgette/preferences.html:84
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:84
msgid "Block"
msgstr "Blokkeren"
-#: searx/templates/preferences.html:62
+#: searx/templates/courgette/preferences.html:92
+#: searx/templates/default/preferences.html:92
msgid ""
-"These settings are stored in your cookies, this allows us not to store "
-"this data about you."
-msgstr ""
-"Deze instellingen worden bewaard in je cookies. Hierdoor hoeven wij niets"
-" over jou te bewaren."
+"These settings are stored in your cookies, this allows us not to store this "
+"data about you."
+msgstr "Deze instellingen worden bewaard in je cookies. Hierdoor hoeven wij niets over jou te bewaren."
-#: searx/templates/preferences.html:64
+#: searx/templates/courgette/preferences.html:94
+#: searx/templates/default/preferences.html:94
msgid ""
"These cookies serve your sole convenience, we don't use these cookies to "
"track you."
-msgstr ""
-"Deze cookies zijn alleen voor je eigen gemak, we gebruiken deze cookies "
-"niet om je te volgen."
+msgstr "Deze cookies zijn alleen voor je eigen gemak, we gebruiken deze cookies niet om je te volgen."
-#: searx/templates/preferences.html:67
+#: searx/templates/courgette/preferences.html:97
+#: searx/templates/default/preferences.html:97
msgid "save"
msgstr "bewaren"
-#: searx/templates/preferences.html:68
+#: searx/templates/courgette/preferences.html:98
+#: searx/templates/default/preferences.html:98
msgid "back"
msgstr "terug"
-#: searx/templates/results.html:11
-msgid "Suggestions"
-msgstr "Suggesties"
-
-#: searx/templates/results.html:22
+#: searx/templates/courgette/results.html:12
+#: searx/templates/default/results.html:12
msgid "Search URL"
msgstr "Zoek URL"
-#: searx/templates/results.html:26
+#: searx/templates/courgette/results.html:16
+#: searx/templates/default/results.html:16
msgid "Download results"
msgstr "Downloaden zoekresultaten"
-#: searx/templates/results.html:62
+#: searx/templates/courgette/results.html:34
+#: searx/templates/default/results.html:34
+msgid "Suggestions"
+msgstr "Suggesties"
+
+#: searx/templates/courgette/results.html:62
+#: searx/templates/default/results.html:62
msgid "previous page"
msgstr "vorige pagina"
-#: searx/templates/results.html:73
+#: searx/templates/courgette/results.html:73
+#: searx/templates/default/results.html:73
msgid "next page"
msgstr "volgende pagina"
-#: searx/templates/search.html:3
+#: searx/templates/courgette/search.html:3
+#: searx/templates/default/search.html:3
msgid "Search for..."
msgstr "Zoeken naar..."
-#: searx/templates/stats.html:4
+#: searx/templates/courgette/stats.html:4 searx/templates/default/stats.html:4
msgid "Engine stats"
msgstr "Zoekmachinestatistieken"
@@ -173,3 +208,5 @@ msgstr "it"
msgid "news"
msgstr "nieuws"
+msgid "map"
+msgstr "kaart"
diff --git a/searx/webapp.py b/searx/webapp.py
index 42cb42678..830cf440a 100644
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -47,15 +47,19 @@ from searx.utils import (
from searx.https_rewrite import https_rules
from searx.languages import language_codes
from searx.search import Search
+from searx.query import Query
from searx.autocomplete import backends as autocomplete_backends
+from urlparse import urlparse
+import re
+
static_path, templates_path, themes =\
get_themes(settings['themes_path']
if settings.get('themes_path')
else searx_dir)
-default_theme = settings['default_theme'] if \
- settings.get('default_theme', None) else 'default'
+
+default_theme = settings['server'].get('default_theme', 'default')
app = Flask(
__name__,
@@ -198,23 +202,67 @@ def index():
'index.html',
)
- search.results, search.suggestions = search.search(request)
+ search.results, search.suggestions, search.answers, search.infoboxes = search.search(request)
for result in search.results:
if not search.paging and engines[result['engine']].paging:
search.paging = True
+ # check if HTTPS rewrite is required
if settings['server']['https_rewrite']\
and result['parsed_url'].scheme == 'http':
- for http_regex, https_url in https_rules:
- if http_regex.match(result['url']):
- result['url'] = http_regex.sub(https_url, result['url'])
- # TODO result['parsed_url'].scheme
+ skip_https_rewrite = False
+
+ # check if HTTPS rewrite is possible
+ for target, rules, exclusions in https_rules:
+
+ # check if target regex match with url
+ if target.match(result['url']):
+ # process exclusions
+ for exclusion in exclusions:
+ # check if exclusion match with url
+ if exclusion.match(result['url']):
+ skip_https_rewrite = True
+ break
+
+ # skip https rewrite if required
+ if skip_https_rewrite:
+ break
+
+ # process rules
+ for rule in rules:
+ try:
+ # TODO, precompile rule
+ p = re.compile(rule[0])
+
+ # rewrite url if possible
+ new_result_url = p.sub(rule[1], result['url'])
+ except:
+ break
+
+ # parse new url
+ new_parsed_url = urlparse(new_result_url)
+
+ # continiue if nothing was rewritten
+ if result['url'] == new_result_url:
+ continue
+
+ # get domainname from result
+ # TODO, does only work correct with TLD's like asdf.com, not for asdf.com.de
+ # TODO, using publicsuffix instead of this rewrite rule
+ old_result_domainname = '.'.join(result['parsed_url'].hostname.split('.')[-2:])
+ new_result_domainname = '.'.join(new_parsed_url.hostname.split('.')[-2:])
+
+ # check if rewritten hostname is the same, to protect against wrong or malicious rewrite rules
+ if old_result_domainname == new_result_domainname:
+ # set new url
+ result['url'] = new_result_url
+
+ # target has matched, do not search over the other rules
break
- # HTTPS rewrite
if search.request_data.get('format', 'html') == 'html':
if 'content' in result:
result['content'] = highlight_content(result['content'],
@@ -291,6 +339,8 @@ def index():
pageno=search.pageno,
base_url=get_base_url(),
suggestions=search.suggestions,
+ answers=search.answers,
+ infoboxes=search.infoboxes,
theme=get_current_theme_name()
)
@@ -308,23 +358,46 @@ def autocompleter():
"""Return autocompleter results"""
request_data = {}
+ # select request method
if request.method == 'POST':
request_data = request.form
else:
request_data = request.args
- query = request_data.get('q', '').encode('utf-8')
+ # set blocked engines
+ if request.cookies.get('blocked_engines'):
+ blocked_engines = request.cookies['blocked_engines'].split(',') # noqa
+ else:
+ blocked_engines = []
+
+ # parse query
+ query = Query(request_data.get('q', '').encode('utf-8'), blocked_engines)
+ query.parse_query()
- if not query:
+ # check if search query is set
+ if not query.getSearchQuery():
return
+ # run autocompleter
completer = autocomplete_backends.get(request.cookies.get('autocomplete'))
+ # check if valid autocompleter is selected
if not completer:
return
- results = completer(query)
+ # run autocompletion
+ raw_results = completer(query.getSearchQuery())
+
+ # parse results (write :language and !engine back to result string)
+ results = []
+ for result in raw_results:
+ result_query = query
+ result_query.changeSearchQuery(result)
+
+ # add parsed result
+ results.append(result_query.getFullQuery())
+ # return autocompleter results
if request_data.get('format') == 'x-suggestions':
return Response(json.dumps([query, results]),
mimetype='application/json')