on master help sign in
Add language support

Allow the user to select a language. It must be written in english, and capitalized, ie : English, French, German, Hungarian... (reverted from commit 829948b85df0510e331372bcd60cb31db9c96a5c)

commit2ea55b1c6451e77381bd88dd82f635d48ff1b6fe authorCqoicebordel <Cqoicebordel@users.noreply.github.com> dateTue 23 Dec 2014, 01:45 (12 years ago) parent829948b
2 files changed+4−13
searx/engines/subtitleseeker.py−6 searx/settings.yml+4−7
searx/engines/subtitleseeker.py−6
@@ -16,8 +16,6 @@ from lxml import html
1616categories = ['videos']
1717paging = True
1818
19−language = ""
20−
2119# search-url
2220url = 'http://www.subtitleseeker.com/'
2321search_url = url+'search/TITLES/{query}&p={pageno}'
@@ -43,10 +41,6 @@ def response(resp):
4341 for result in dom.xpath(results_xpath):
4442 link = result.xpath(".//a")[0]
4543 href = link.attrib.get('href')
46−
47− if language is not "":
48− href = href + language + "/"
49−
5044 title = escape(link.xpath(".//text()")[0])
5145
5246 content = result.xpath('.//div[contains(@class,"red")]//text()')[0]
searx/settings.yml+4−7
@@ -1,13 +1,13 @@
11server:
2− port : 2722
3− secret_key : "8f92c98926f04c8cb2a5fdc3bca19f7c" # change this!
4− debug : True # Debug mode, only for development
2+ port : 8888
3+ secret_key : "ultrasecretkey" # change this!
4+ debug : False # Debug mode, only for development
55 request_timeout : 2.0 # seconds
66 base_url : False # Set custom base_url. Possible values: False or "https://your.custom.host/location/"
77 themes_path : "" # Custom ui themes path
88 default_theme : default # ui theme
99 https_rewrite : True # Force rewrite result urls. See searx/https_rewrite.py
10− useragent_suffix : "Cqcb Style" # suffix of searx_useragent, could contain informations like an email address to the administrator
10+ useragent_suffix : "" # suffix of searx_useragent, could contain informations like an email address to the administrator
1111
1212engines:
1313 - name : wikipedia
@@ -130,9 +130,6 @@ engines:
130130 - name : subtitleseeker
131131 engine : subtitleseeker
132132 shortcut : ss
133−# The language is an option. You can put any language written in english
134−# Examples : English, French, German, Hungarian, Chinese...
135−# language : English
136133
137134 - name : startpage
138135 engine : startpage