forked from Ponysearch/Ponysearch
Merge pull request #2499 from dalf/remove-language-support-variable
[mod] dynamically set language_support variable
This commit is contained in:
commit
1742355eb8
32 changed files with 3 additions and 33 deletions
|
@ -42,7 +42,6 @@ argument type information
|
|||
======================= =========== ========================================================
|
||||
categories list pages, in which the engine is working
|
||||
paging boolean support multible pages
|
||||
language_support boolean support language choosing
|
||||
time_range_support boolean support search time range
|
||||
engine_type str ``online`` by default, other possibles values are
|
||||
``offline``, ``online_dictionnary``, ``online_currency``
|
||||
|
@ -97,7 +96,6 @@ example code
|
|||
# engine dependent config
|
||||
categories = ['general']
|
||||
paging = True
|
||||
language_support = True
|
||||
|
||||
|
||||
making a request
|
||||
|
|
|
@ -44,7 +44,6 @@ babel_langs = [lang_parts[0] + '-' + lang_parts[-1] if len(lang_parts) > 1 else
|
|||
engine_shortcuts = {}
|
||||
engine_default_args = {'paging': False,
|
||||
'categories': ['general'],
|
||||
'language_support': True,
|
||||
'supported_languages': [],
|
||||
'safesearch': False,
|
||||
'timeout': settings['outgoing']['request_timeout'],
|
||||
|
@ -127,6 +126,9 @@ def load_engine(engine_data):
|
|||
|
||||
setattr(engine, 'language_aliases', language_aliases)
|
||||
|
||||
# language_support
|
||||
setattr(engine, 'language_support', len(getattr(engine, 'supported_languages', [])) > 0)
|
||||
|
||||
# assign language fetching method if auxiliary method exists
|
||||
if hasattr(engine, '_fetch_supported_languages'):
|
||||
setattr(engine, 'fetch_supported_languages',
|
||||
|
|
|
@ -21,7 +21,6 @@ about = {
|
|||
|
||||
# engine dependent config
|
||||
categories = ['it']
|
||||
language_support = True
|
||||
paging = True
|
||||
base_url = 'https://wiki.archlinux.org'
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ about = {
|
|||
# engine dependent config
|
||||
categories = ['general']
|
||||
paging = True
|
||||
language_support = True
|
||||
supported_languages_url = 'https://www.bing.com/account/general'
|
||||
language_aliases = {'zh-CN': 'zh-CHS', 'zh-TW': 'zh-CHT', 'zh-HK': 'zh-CHT'}
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ categories = ['images']
|
|||
paging = True
|
||||
safesearch = True
|
||||
time_range_support = True
|
||||
language_support = True
|
||||
supported_languages_url = 'https://www.bing.com/account/general'
|
||||
number_of_results = 28
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@ about = {
|
|||
# engine dependent config
|
||||
categories = ['news']
|
||||
paging = True
|
||||
language_support = True
|
||||
time_range_support = True
|
||||
|
||||
# search-url
|
||||
|
|
|
@ -26,7 +26,6 @@ paging = True
|
|||
safesearch = True
|
||||
time_range_support = True
|
||||
number_of_results = 28
|
||||
language_support = True
|
||||
|
||||
base_url = 'https://www.bing.com/'
|
||||
search_string = 'videos/search'\
|
||||
|
|
|
@ -21,7 +21,6 @@ about = {
|
|||
# engine dependent config
|
||||
categories = ['videos']
|
||||
paging = True
|
||||
language_support = True
|
||||
|
||||
# search-url
|
||||
# see http://www.dailymotion.com/doc/api/obj-video.html
|
||||
|
|
|
@ -20,7 +20,6 @@ about = {
|
|||
# engine dependent config
|
||||
categories = ['general'] # TODO , 'images', 'music', 'videos', 'files'
|
||||
paging = False
|
||||
language_support = False
|
||||
number_of_results = 5
|
||||
|
||||
# search-url
|
||||
|
|
|
@ -20,7 +20,6 @@ about = {
|
|||
# engine dependent config
|
||||
categories = ['general']
|
||||
paging = False
|
||||
language_support = True
|
||||
supported_languages_url = 'https://duckduckgo.com/util/u172.js'
|
||||
time_range_support = True
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ about = {
|
|||
# engine dependent config
|
||||
categories = ['images']
|
||||
paging = True
|
||||
language_support = True
|
||||
safesearch = True
|
||||
|
||||
# search-url
|
||||
|
|
|
@ -20,7 +20,6 @@ about = {
|
|||
|
||||
categories = ['general']
|
||||
paging = True
|
||||
language_support = False
|
||||
|
||||
# search-url
|
||||
base_url = 'https://www.duden.de/'
|
||||
|
|
|
@ -19,7 +19,6 @@ about = {
|
|||
|
||||
categories = ['general']
|
||||
paging = False
|
||||
language_support = False
|
||||
safesearch = True
|
||||
|
||||
base_url = 'https://www.etools.ch'
|
||||
|
|
|
@ -20,7 +20,6 @@ about = {
|
|||
# engine dependent config
|
||||
categories = ['music']
|
||||
paging = True
|
||||
language_support = False
|
||||
page_size = 5
|
||||
|
||||
url = 'https://genius.com/api/'
|
||||
|
|
|
@ -19,7 +19,6 @@ about = {
|
|||
|
||||
# engine dependent config
|
||||
categories = ['it']
|
||||
language_support = True
|
||||
paging = True
|
||||
base_url = 'https://wiki.gentoo.org'
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ about = {
|
|||
categories = ['general']
|
||||
# gigablast's pagination is totally damaged, don't use it
|
||||
paging = False
|
||||
language_support = True
|
||||
safesearch = True
|
||||
|
||||
# search-url
|
||||
|
|
|
@ -31,7 +31,6 @@ about = {
|
|||
# engine dependent config
|
||||
categories = ['general']
|
||||
paging = True
|
||||
language_support = True
|
||||
time_range_support = True
|
||||
safesearch = True
|
||||
supported_languages_url = 'https://www.google.com/preferences?#languages'
|
||||
|
|
|
@ -56,7 +56,6 @@ about = {
|
|||
# engine dependent config
|
||||
categories = ['images']
|
||||
paging = False
|
||||
language_support = True
|
||||
use_locale_domain = True
|
||||
time_range_support = True
|
||||
safesearch = True
|
||||
|
|
|
@ -68,7 +68,6 @@ time_range_dict = {
|
|||
|
||||
categories = ['news']
|
||||
paging = False
|
||||
language_support = True
|
||||
use_locale_domain = True
|
||||
time_range_support = True
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ about = {
|
|||
# engine dependent config
|
||||
categories = ["videos", "music"]
|
||||
paging = True
|
||||
language_support = True
|
||||
time_range_support = True
|
||||
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ about = {
|
|||
|
||||
# engine dependent config
|
||||
categories = ['general']
|
||||
language_support = True
|
||||
paging = True
|
||||
number_of_results = 1
|
||||
search_type = 'nearmatch' # possible values: title, text, nearmatch
|
||||
|
|
|
@ -21,7 +21,6 @@ about = {
|
|||
# engine dependent config
|
||||
categories = ["videos"]
|
||||
paging = True
|
||||
language_support = True
|
||||
base_url = "https://peer.tube/"
|
||||
supported_languages_url = base_url + "api/v1/videos/languages"
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ about = {
|
|||
# engine dependent config
|
||||
categories = ['map']
|
||||
paging = False
|
||||
language_support = True
|
||||
number_of_results = 10
|
||||
|
||||
# search-url
|
||||
|
|
|
@ -23,7 +23,6 @@ about = {
|
|||
# engine dependent config
|
||||
categories = []
|
||||
paging = True
|
||||
language_support = True
|
||||
supported_languages_url = 'https://qwant.com/region'
|
||||
|
||||
category_to_keyword = {'general': 'web',
|
||||
|
|
|
@ -20,7 +20,6 @@ about = {
|
|||
|
||||
categories = ['videos']
|
||||
paging = True
|
||||
language_support = True
|
||||
time_range_support = True
|
||||
safesearch = True
|
||||
supported_languages = [
|
||||
|
|
|
@ -29,7 +29,6 @@ categories = ['general']
|
|||
# storing of qid's between mulitble search-calls
|
||||
|
||||
paging = True
|
||||
language_support = True
|
||||
supported_languages_url = 'https://www.startpage.com/do/settings'
|
||||
|
||||
# search-url
|
||||
|
|
|
@ -24,7 +24,6 @@ about = {
|
|||
# engine dependent config
|
||||
categories = ['general', 'images'] # TODO , 'music', 'videos', 'files'
|
||||
paging = True
|
||||
language_support = True
|
||||
number_of_results = 5
|
||||
http_digest_auth_user = ""
|
||||
http_digest_auth_pass = ""
|
||||
|
|
|
@ -20,7 +20,6 @@ about = {
|
|||
# engine dependent config
|
||||
categories = ['general']
|
||||
paging = True
|
||||
language_support = True
|
||||
time_range_support = True
|
||||
|
||||
# search-url
|
||||
|
|
|
@ -25,7 +25,6 @@ about = {
|
|||
# engine dependent config
|
||||
categories = ['news']
|
||||
paging = True
|
||||
language_support = True
|
||||
|
||||
# search-url
|
||||
search_url = 'https://news.search.yahoo.com/search?{query}&b={offset}&{lang}=uh3_news_web_gs_1&pz=10&xargs=0&vl=lang_{lang}' # noqa
|
||||
|
|
|
@ -23,7 +23,6 @@ about = {
|
|||
# engine dependent config
|
||||
categories = ['general']
|
||||
paging = True
|
||||
language_support = True # TODO
|
||||
|
||||
default_tld = 'com'
|
||||
language_map = {'ru': 'ru',
|
||||
|
|
|
@ -21,7 +21,6 @@ about = {
|
|||
# engine dependent config
|
||||
categories = ['videos', 'music']
|
||||
paging = False
|
||||
language_support = True
|
||||
api_key = None
|
||||
|
||||
# search-url
|
||||
|
|
|
@ -20,7 +20,6 @@ about = {
|
|||
# engine dependent config
|
||||
categories = ['videos', 'music']
|
||||
paging = True
|
||||
language_support = False
|
||||
time_range_support = True
|
||||
|
||||
# search-url
|
||||
|
|
Loading…
Reference in a new issue