From b02f762687c117baba523cefdcd16d0f94ae886a Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Wed, 22 Dec 2021 16:58:52 +0100 Subject: [PATCH] [enh] add more categories --- searx/engines/apkmirror.py | 2 +- searx/engines/archlinux.py | 2 +- searx/engines/bing.py | 2 +- searx/engines/bing_images.py | 2 +- searx/engines/bing_videos.py | 2 +- searx/engines/duckduckgo.py | 2 +- searx/engines/duckduckgo_images.py | 2 +- searx/engines/duden.py | 2 +- searx/engines/etools.py | 2 +- searx/engines/fdroid.py | 2 +- searx/engines/genius.py | 2 +- searx/engines/gentoo.py | 2 +- searx/engines/gigablast.py | 2 +- searx/engines/github.py | 2 +- searx/engines/google.py | 2 +- searx/engines/google_images.py | 2 +- searx/engines/google_videos.py | 2 +- searx/engines/seznam.py | 1 + searx/engines/sjp.py | 2 +- searx/engines/startpage.py | 2 +- searx/engines/translated.py | 2 +- searx/engines/yahoo.py | 2 +- searx/settings.yml | 50 ++++++++++++++++-------------- 23 files changed, 48 insertions(+), 45 deletions(-) diff --git a/searx/engines/apkmirror.py b/searx/engines/apkmirror.py index da84bc79e..ac7cd7431 100644 --- a/searx/engines/apkmirror.py +++ b/searx/engines/apkmirror.py @@ -24,7 +24,7 @@ about = { } # engine dependent config -categories = ['files'] +categories = ['files', 'apps'] paging = True time_range_support = False diff --git a/searx/engines/archlinux.py b/searx/engines/archlinux.py index 1cfb3983f..b5e426107 100644 --- a/searx/engines/archlinux.py +++ b/searx/engines/archlinux.py @@ -20,7 +20,7 @@ about = { } # engine dependent config -categories = ['it'] +categories = ['it', 'software wikis'] paging = True base_url = 'https://wiki.archlinux.org' diff --git a/searx/engines/bing.py b/searx/engines/bing.py index 1170227ad..9744b1800 100644 --- a/searx/engines/bing.py +++ b/searx/engines/bing.py @@ -20,7 +20,7 @@ about = { } # engine dependent config -categories = ['general'] +categories = ['general', 'web'] paging = True time_range_support = False safesearch = False diff --git a/searx/engines/bing_images.py b/searx/engines/bing_images.py index f07d07144..cb69dc172 100644 --- a/searx/engines/bing_images.py +++ b/searx/engines/bing_images.py @@ -27,7 +27,7 @@ about = { } # engine dependent config -categories = ['images'] +categories = ['images', 'web'] paging = True safesearch = True time_range_support = True diff --git a/searx/engines/bing_videos.py b/searx/engines/bing_videos.py index 184f564df..ae8e8d49a 100644 --- a/searx/engines/bing_videos.py +++ b/searx/engines/bing_videos.py @@ -26,7 +26,7 @@ about = { "results": 'HTML', } -categories = ['videos'] +categories = ['videos', 'web'] paging = True safesearch = True time_range_support = True diff --git a/searx/engines/duckduckgo.py b/searx/engines/duckduckgo.py index 0d2a524df..71da72677 100644 --- a/searx/engines/duckduckgo.py +++ b/searx/engines/duckduckgo.py @@ -27,7 +27,7 @@ about = { } # engine dependent config -categories = ['general'] +categories = ['general', 'web'] paging = True supported_languages_url = 'https://duckduckgo.com/util/u588.js' time_range_support = True diff --git a/searx/engines/duckduckgo_images.py b/searx/engines/duckduckgo_images.py index 2f75e16f1..7d844b543 100644 --- a/searx/engines/duckduckgo_images.py +++ b/searx/engines/duckduckgo_images.py @@ -27,7 +27,7 @@ about = { } # engine dependent config -categories = ['images'] +categories = ['images', 'web'] paging = True safesearch = True diff --git a/searx/engines/duden.py b/searx/engines/duden.py index 600b61f3c..090295b91 100644 --- a/searx/engines/duden.py +++ b/searx/engines/duden.py @@ -19,7 +19,7 @@ about = { "language": 'de', } -categories = ['general'] +categories = ['general', 'dictionaries'] paging = True # search-url diff --git a/searx/engines/etools.py b/searx/engines/etools.py index 347463291..08bc63cd8 100644 --- a/searx/engines/etools.py +++ b/searx/engines/etools.py @@ -17,7 +17,7 @@ about = { "results": 'HTML', } -categories = ['general'] +categories = ['general', 'web'] paging = False safesearch = True diff --git a/searx/engines/fdroid.py b/searx/engines/fdroid.py index c381b25d4..b5f004e7b 100644 --- a/searx/engines/fdroid.py +++ b/searx/engines/fdroid.py @@ -18,7 +18,7 @@ about = { } # engine dependent config -categories = ['files'] +categories = ['files', 'apps'] paging = True # search-url diff --git a/searx/engines/genius.py b/searx/engines/genius.py index b0fcb09a8..1f4b4b03e 100644 --- a/searx/engines/genius.py +++ b/searx/engines/genius.py @@ -20,7 +20,7 @@ about = { } # engine dependent config -categories = ['music'] +categories = ['music', 'lyrics'] paging = True page_size = 5 diff --git a/searx/engines/gentoo.py b/searx/engines/gentoo.py index 5b9edafe0..856c93710 100644 --- a/searx/engines/gentoo.py +++ b/searx/engines/gentoo.py @@ -18,7 +18,7 @@ about = { } # engine dependent config -categories = ['it'] +categories = ['it', 'software wikis'] paging = True base_url = 'https://wiki.gentoo.org' diff --git a/searx/engines/gigablast.py b/searx/engines/gigablast.py index c657dca30..1c40ff331 100644 --- a/searx/engines/gigablast.py +++ b/searx/engines/gigablast.py @@ -22,7 +22,7 @@ about = { } # engine dependent config -categories = ['general'] +categories = ['general', 'web'] # gigablast's pagination is totally damaged, don't use it paging = False safesearch = True diff --git a/searx/engines/github.py b/searx/engines/github.py index 1d12d296a..343f3793d 100644 --- a/searx/engines/github.py +++ b/searx/engines/github.py @@ -17,7 +17,7 @@ about = { } # engine dependent config -categories = ['it'] +categories = ['it', 'repos'] # search-url search_url = 'https://api.github.com/search/repositories?sort=stars&order=desc&{query}' # noqa diff --git a/searx/engines/google.py b/searx/engines/google.py index 685697d29..ed4381f47 100644 --- a/searx/engines/google.py +++ b/searx/engines/google.py @@ -41,7 +41,7 @@ about = { } # engine dependent config -categories = ['general'] +categories = ['general', 'web'] paging = True time_range_support = True safesearch = True diff --git a/searx/engines/google_images.py b/searx/engines/google_images.py index 203df404a..2855860d8 100644 --- a/searx/engines/google_images.py +++ b/searx/engines/google_images.py @@ -45,7 +45,7 @@ about = { } # engine dependent config -categories = ['images'] +categories = ['images', 'web'] paging = False use_locale_domain = True time_range_support = True diff --git a/searx/engines/google_videos.py b/searx/engines/google_videos.py index 049f9138c..06aac8ae1 100644 --- a/searx/engines/google_videos.py +++ b/searx/engines/google_videos.py @@ -54,7 +54,7 @@ about = { # engine dependent config -categories = ['videos'] +categories = ['videos', 'web'] paging = False language_support = True use_locale_domain = True diff --git a/searx/engines/seznam.py b/searx/engines/seznam.py index 2e95b4769..48a167ce0 100644 --- a/searx/engines/seznam.py +++ b/searx/engines/seznam.py @@ -25,6 +25,7 @@ about = { "language": "cz", } +categories = ['general', 'web'] base_url = 'https://search.seznam.cz/' diff --git a/searx/engines/sjp.py b/searx/engines/sjp.py index ad498b847..97a81d8a7 100644 --- a/searx/engines/sjp.py +++ b/searx/engines/sjp.py @@ -21,7 +21,7 @@ about = { "language": 'pl', } -categories = ['general'] +categories = ['general', 'dictionaries'] paging = False URL = 'https://sjp.pwn.pl' diff --git a/searx/engines/startpage.py b/searx/engines/startpage.py index 65d90debe..97891921c 100644 --- a/searx/engines/startpage.py +++ b/searx/engines/startpage.py @@ -23,7 +23,7 @@ about = { } # engine dependent config -categories = ['general'] +categories = ['general', 'web'] # there is a mechanism to block "bot" search # (probably the parameter qid), require # storing of qid's between mulitble search-calls diff --git a/searx/engines/translated.py b/searx/engines/translated.py index 62ade49e2..6cc56328b 100644 --- a/searx/engines/translated.py +++ b/searx/engines/translated.py @@ -14,7 +14,7 @@ about = { } engine_type = 'online_dictionary' -categories = ['general'] +categories = ['general', 'dictionaries'] url = 'https://api.mymemory.translated.net/get?q={query}&langpair={from_lang}|{to_lang}{key}' web_url = 'https://mymemory.translated.net/en/{from_lang}/{to_lang}/{query}' weight = 100 diff --git a/searx/engines/yahoo.py b/searx/engines/yahoo.py index 08bde6665..6bf1932e4 100644 --- a/searx/engines/yahoo.py +++ b/searx/engines/yahoo.py @@ -31,7 +31,7 @@ about = { } # engine dependent config -categories = ['general'] +categories = ['general', 'web'] paging = True time_range_support = True supported_languages_url = 'https://search.yahoo.com/preferences/languages' diff --git a/searx/settings.yml b/searx/settings.yml index 18d047535..0f1369328 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -325,7 +325,7 @@ engines: url_xpath: //article[@class="repo-summary"]//a[@class="repo-link"]/@href title_xpath: //article[@class="repo-summary"]//a[@class="repo-link"] content_xpath: //article[@class="repo-summary"]/p - categories: it + categories: [it, repos] timeout: 4.0 disabled: true shortcut: bb @@ -424,7 +424,7 @@ engines: - name: docker hub engine: docker_hub shortcut: dh - categories: it + categories: [it, packages] - name: erowid engine: xpath @@ -494,6 +494,7 @@ engines: content_xpath: //section[contains(@class, "word__defination")] first_page_num: 1 shortcut: et + categories: [general, dictionaries] disabled: true about: website: https://www.etymonline.com/ @@ -533,7 +534,7 @@ engines: - name: free software directory engine: mediawiki shortcut: fsd - categories: it + categories: [it, software wikis] base_url: https://directory.fsf.org/ number_of_results: 5 # what part of a page matches the query string: title, text, nearmatch @@ -584,7 +585,7 @@ engines: title_query: name_with_namespace content_query: description page_size: 20 - categories: it + categories: [it, repos] shortcut: gl timeout: 10.0 disabled: true @@ -610,7 +611,7 @@ engines: url_query: html_url title_query: name content_query: description - categories: it + categories: [it, repos] shortcut: cb disabled: true about: @@ -676,7 +677,7 @@ engines: url_xpath: './/div[@class="RZEgze"]//div[@class="kCSSQe"]//a/@href' content_xpath: './/div[@class="RZEgze"]//a[@class="mnKHRc"]' thumbnail_xpath: './/div[@class="uzcko"]/div/span[1]//img/@data-src' - categories: files + categories: [files, apps] shortcut: gpa disabled: true about: @@ -754,7 +755,7 @@ engines: url_xpath: './/div[@class="ans"]//a/@href' content_xpath: './/div[@class="from"]' page_size: 20 - categories: it + categories: [it, packages] shortcut: ho about: website: https://hoogle.haskell.org/ @@ -849,7 +850,7 @@ engines: engine: xpath timeout: 4.0 disabled: true - categories: music + categories: [music, lyrics] paging: true search_url: https://search.azlyrics.com/search.php?q={query}&w=lyrics&p={pageno} url_xpath: //td[@class="text-left visitedlyr"]/a/@href @@ -904,7 +905,7 @@ engines: title_query: package/name content_query: package/description page_size: 25 - categories: it + categories: [it, packages] disabled: true timeout: 5.0 shortcut: npm @@ -1013,7 +1014,7 @@ engines: url_query: url title_query: name content_query: description - categories: it + categories: [it, packages] disabled: true timeout: 5.0 shortcut: pack @@ -1070,7 +1071,7 @@ engines: content_xpath: ./p suggestion_xpath: /html/body/main/div/div/div/form/div/div[@class="callout-block"]/p/span/a[@class="link"] first_page_num: 1 - categories: it + categories: [it, packages] about: website: https://pypi.org wikidata_id: Q2984686 @@ -1082,7 +1083,7 @@ engines: - name: qwant engine: qwant shortcut: qw - categories: general + categories: [general, web] disabled: false additional_tests: rosebud: *test_rosebud @@ -1097,14 +1098,14 @@ engines: - name: qwant images engine: qwant shortcut: qwi - categories: images + categories: [images, web] disabled: false network: qwant - name: qwant videos engine: qwant shortcut: qwv - categories: videos + categories: [videos, web] disabled: false network: qwant @@ -1164,19 +1165,19 @@ engines: engine: stackexchange shortcut: st api_site: 'stackoverflow' - categories: it + categories: [it, q&a] - name: askubuntu engine: stackexchange shortcut: ubuntu api_site: 'askubuntu' - categories: it + categories: [it, q&a] - name: superuser engine: stackexchange shortcut: su api_site: 'superuser' - categories: it + categories: [it, q&a] - name: searchcode code engine: searchcode_code @@ -1359,7 +1360,7 @@ engines: url_query: URL title_query: Title content_query: Snippet - categories: general + categories: [general, web] shortcut: wib disabled: true about: @@ -1418,7 +1419,7 @@ engines: - name: wiktionary engine: mediawiki shortcut: wt - categories: general + categories: [general, dictionaries] base_url: "https://{language}.wiktionary.org/" number_of_results: 5 search_type: text @@ -1506,6 +1507,7 @@ engines: shortcut: mjk engine: xpath paging: true + categories: [general, web] search_url: https://www.mojeek.com/search?q={query}&s={pageno} results_xpath: /html/body//div[@class="results"]/ul[@class="results-standard"]/li url_xpath: ./h2/a/@href @@ -1525,6 +1527,7 @@ engines: - name: naver shortcut: nvr + categories: [general, web] engine: xpath paging: true search_url: https://search.naver.com/search.naver?where=webkr&sm=osp_hty&ie=UTF-8&query={query}&start={pageno} @@ -1554,7 +1557,7 @@ engines: content_xpath: ./span/p suggestion_xpath: /html/body/main/div/div[@class="search__suggestions"]/p/a first_page_num: 1 - categories: it + categories: [it, packages] disabled: true about: website: https://rubygems.org/ @@ -1598,14 +1601,14 @@ engines: engine: wordnik shortcut: def base_url: https://www.wordnik.com/ - categories: general + categories: [general, dictionaries] timeout: 5.0 disabled: true - name: woxikon.de synonyme engine: xpath shortcut: woxi - categories: general + categories: [general, dictionaries] timeout: 5.0 disabled: true search_url: https://synonyme.woxikon.de/synonyme/{query}.php @@ -1624,7 +1627,6 @@ engines: engine: sjp shortcut: sjp base_url: https://sjp.pwn.pl/ - categories: general timeout: 5.0 disabled: true @@ -1657,7 +1659,7 @@ engines: title_xpath: //span[@class="snippet-title"] content_xpath: //p[1][@class="snippet-description"] suggestion_xpath: //div[@class="text-gray h6"]/a - categories: general + categories: [general, web] about: website: https://brave.com/search/ wikidata_id: Q107355971