search-web-api 1.0.124 → 1.0.126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/package.json +1 -1
- package/src/category-registry.ts +1 -1
- package/src/constants.ts +1 -1
- package/src/engine-descriptions.ts +1 -1
- package/src/engine-status.ts +1 -1
- package/src/engine.ts +1 -1
- package/src/registry/search-engine-category-registry.ts +2 -2
- package/src/registry/search-engine-status-tracker.ts +1 -1
- package/src/result-container.ts +1 -1
- package/src/search/__tests__/public-searxng.test.ts +176 -1
- package/src/search/public-searxng.ts +136 -33
- package/src/search/search-engines-registry-list.ts +74 -74
- package/src/search/search-query-executor.ts +5 -5
- package/src/search/search-result-container.ts +2 -2
- package/src/search-web-types.ts +1 -1
- package/src/search.ts +2 -2
- package/src/sources/academic/arxiv.ts +1 -1
- package/src/sources/academic/core.ts +1 -1
- package/src/sources/academic/crossref.ts +1 -1
- package/src/sources/academic/doaj.ts +1 -1
- package/src/sources/academic/google_scholar.ts +1 -1
- package/src/sources/academic/openalex.ts +1 -1
- package/src/sources/academic/pubmed.ts +1 -1
- package/src/sources/academic/semantic_scholar.ts +1 -1
- package/src/sources/academic/wikidata.ts +1 -1
- package/src/sources/general/baidu.ts +1 -1
- package/src/sources/general/bing.ts +1 -1
- package/src/sources/general/brave.ts +1 -1
- package/src/sources/general/duckduckgo.ts +1 -1
- package/src/sources/general/google.ts +1 -1
- package/src/sources/general/mojeek.ts +1 -1
- package/src/sources/general/qwant.ts +1 -1
- package/src/sources/general/startpage.ts +1 -1
- package/src/sources/general/yahoo.ts +1 -1
- package/src/sources/general/yandex.ts +1 -1
- package/src/sources/images/bing_images.ts +1 -1
- package/src/sources/images/deviantart.ts +1 -1
- package/src/sources/images/flickr.ts +1 -1
- package/src/sources/images/google_images.ts +1 -1
- package/src/sources/images/imgur.ts +1 -1
- package/src/sources/images/openclipart.ts +1 -1
- package/src/sources/images/pixabay.ts +1 -1
- package/src/sources/images/unsplash.ts +1 -1
- package/src/sources/images/wallhaven.ts +1 -1
- package/src/sources/it/crates.ts +1 -1
- package/src/sources/it/dockerhub.ts +1 -1
- package/src/sources/it/github.ts +1 -1
- package/src/sources/it/gitlab.ts +1 -1
- package/src/sources/it/npm.ts +1 -1
- package/src/sources/it/packagist.ts +1 -1
- package/src/sources/it/pypi.ts +1 -1
- package/src/sources/it/rubygems.ts +1 -1
- package/src/sources/it/stackoverflow.ts +1 -1
- package/src/sources/maps/apple_maps.ts +1 -1
- package/src/sources/maps/openstreetmap.ts +1 -1
- package/src/sources/maps/photon.ts +1 -1
- package/src/sources/news/bing_news.ts +1 -1
- package/src/sources/news/google_news.ts +1 -1
- package/src/sources/news/hackernews.ts +1 -1
- package/src/sources/news/yahoo_news.ts +1 -1
- package/src/sources/shopping/ebay.ts +1 -1
- package/src/sources/social/mastodon.ts +1 -1
- package/src/sources/social/medium.ts +1 -1
- package/src/sources/social/reddit.ts +1 -1
- package/src/sources/social/soundcloud.ts +1 -1
- package/src/sources/social/twitter.ts +1 -1
- package/src/sources/specialized/annas_archive.ts +1 -1
- package/src/sources/specialized/archive.ts +1 -1
- package/src/sources/specialized/genius.ts +1 -1
- package/src/sources/specialized/goodreads.ts +1 -1
- package/src/sources/specialized/imdb.ts +1 -1
- package/src/sources/specialized/openlibrary.ts +1 -1
- package/src/sources/specialized/wikipedia.ts +1 -1
- package/src/sources/specialized/wttr.ts +1 -1
- package/src/sources/torrents/1337x.ts +1 -1
- package/src/sources/torrents/eztv.ts +1 -1
- package/src/sources/torrents/kickass.ts +1 -1
- package/src/sources/torrents/nyaa.ts +1 -1
- package/src/sources/torrents/solidtorrents.ts +1 -1
- package/src/sources/torrents/thepiratebay.ts +1 -1
- package/src/sources/torrents/yts.ts +1 -1
- package/src/sources/videos/bing_videos.ts +1 -1
- package/src/sources/videos/dailymotion.ts +1 -1
- package/src/sources/videos/invidious.ts +1 -1
- package/src/sources/videos/peertube.ts +1 -1
- package/src/sources/videos/vimeo.ts +1 -1
- package/src/sources/videos/youtube.ts +1 -1
- package/src/types/search-engine-interface.ts +1 -1
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
* data separate from the query-execution logic.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import { EngineFunction } from "../types/search-engine-interface
|
|
13
|
-
import { EngineMetadata } from "../types/search-result-types
|
|
14
|
-
import { engineDescriptions } from "../registry/search-engine-descriptions
|
|
12
|
+
import { EngineFunction } from "../types/search-engine-interface";
|
|
13
|
+
import { EngineMetadata } from "../types/search-result-types";
|
|
14
|
+
import { engineDescriptions } from "../registry/search-engine-descriptions";
|
|
15
15
|
import grab from "grab-url";
|
|
16
16
|
|
|
17
17
|
// Set default browser User-Agent for all outgoing requests
|
|
@@ -24,97 +24,97 @@ grab("", {
|
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
// General search engines
|
|
27
|
-
import { google } from "../sources/general/google
|
|
28
|
-
import { bing } from "../sources/general/bing
|
|
29
|
-
import { duckduckgo } from "../sources/general/duckduckgo
|
|
30
|
-
import { yahoo } from "../sources/general/yahoo
|
|
31
|
-
import { qwant } from "../sources/general/qwant
|
|
32
|
-
import { startpage } from "../sources/general/startpage
|
|
33
|
-
import { brave } from "../sources/general/brave
|
|
34
|
-
import { yandex } from "../sources/general/yandex
|
|
35
|
-
import { baidu } from "../sources/general/baidu
|
|
36
|
-
import { mojeek } from "../sources/general/mojeek
|
|
27
|
+
import { google } from "../sources/general/google";
|
|
28
|
+
import { bing } from "../sources/general/bing";
|
|
29
|
+
import { duckduckgo } from "../sources/general/duckduckgo";
|
|
30
|
+
import { yahoo } from "../sources/general/yahoo";
|
|
31
|
+
import { qwant } from "../sources/general/qwant";
|
|
32
|
+
import { startpage } from "../sources/general/startpage";
|
|
33
|
+
import { brave } from "../sources/general/brave";
|
|
34
|
+
import { yandex } from "../sources/general/yandex";
|
|
35
|
+
import { baidu } from "../sources/general/baidu";
|
|
36
|
+
import { mojeek } from "../sources/general/mojeek";
|
|
37
37
|
|
|
38
38
|
// IT / Developer engines
|
|
39
|
-
import { github } from "../sources/it/github
|
|
40
|
-
import { stackoverflow } from "../sources/it/stackoverflow
|
|
41
|
-
import { npm } from "../sources/it/npm
|
|
42
|
-
import { crates } from "../sources/it/crates
|
|
43
|
-
import { dockerhub } from "../sources/it/dockerhub
|
|
44
|
-
import { pypi } from "../sources/it/pypi
|
|
45
|
-
import { packagist } from "../sources/it/packagist
|
|
46
|
-
import { rubygems } from "../sources/it/rubygems
|
|
47
|
-
import { gitlab } from "../sources/it/gitlab
|
|
39
|
+
import { github } from "../sources/it/github";
|
|
40
|
+
import { stackoverflow } from "../sources/it/stackoverflow";
|
|
41
|
+
import { npm } from "../sources/it/npm";
|
|
42
|
+
import { crates } from "../sources/it/crates";
|
|
43
|
+
import { dockerhub } from "../sources/it/dockerhub";
|
|
44
|
+
import { pypi } from "../sources/it/pypi";
|
|
45
|
+
import { packagist } from "../sources/it/packagist";
|
|
46
|
+
import { rubygems } from "../sources/it/rubygems";
|
|
47
|
+
import { gitlab } from "../sources/it/gitlab";
|
|
48
48
|
|
|
49
49
|
// Image engines
|
|
50
|
-
import { unsplash } from "../sources/images/unsplash
|
|
51
|
-
import { bing_images } from "../sources/images/bing_images
|
|
52
|
-
import { google_images } from "../sources/images/google_images
|
|
53
|
-
import { flickr } from "../sources/images/flickr
|
|
54
|
-
import { imgur } from "../sources/images/imgur
|
|
55
|
-
import { pixabay } from "../sources/images/pixabay
|
|
56
|
-
import { wallhaven } from "../sources/images/wallhaven
|
|
57
|
-
import { deviantart } from "../sources/images/deviantart
|
|
58
|
-
import { openclipart } from "../sources/images/openclipart
|
|
50
|
+
import { unsplash } from "../sources/images/unsplash";
|
|
51
|
+
import { bing_images } from "../sources/images/bing_images";
|
|
52
|
+
import { google_images } from "../sources/images/google_images";
|
|
53
|
+
import { flickr } from "../sources/images/flickr";
|
|
54
|
+
import { imgur } from "../sources/images/imgur";
|
|
55
|
+
import { pixabay } from "../sources/images/pixabay";
|
|
56
|
+
import { wallhaven } from "../sources/images/wallhaven";
|
|
57
|
+
import { deviantart } from "../sources/images/deviantart";
|
|
58
|
+
import { openclipart } from "../sources/images/openclipart";
|
|
59
59
|
|
|
60
60
|
// Video engines
|
|
61
|
-
import { youtube } from "../sources/videos/youtube
|
|
62
|
-
import { vimeo } from "../sources/videos/vimeo
|
|
63
|
-
import { dailymotion } from "../sources/videos/dailymotion
|
|
64
|
-
import { invidious } from "../sources/videos/invidious
|
|
65
|
-
import { peertube } from "../sources/videos/peertube
|
|
66
|
-
import { bing_videos } from "../sources/videos/bing_videos
|
|
61
|
+
import { youtube } from "../sources/videos/youtube";
|
|
62
|
+
import { vimeo } from "../sources/videos/vimeo";
|
|
63
|
+
import { dailymotion } from "../sources/videos/dailymotion";
|
|
64
|
+
import { invidious } from "../sources/videos/invidious";
|
|
65
|
+
import { peertube } from "../sources/videos/peertube";
|
|
66
|
+
import { bing_videos } from "../sources/videos/bing_videos";
|
|
67
67
|
|
|
68
68
|
// News engines
|
|
69
|
-
import { hackernews } from "../sources/news/hackernews
|
|
70
|
-
import { yahoo_news } from "../sources/news/yahoo_news
|
|
71
|
-
import { bing_news } from "../sources/news/bing_news
|
|
72
|
-
import { google_news } from "../sources/news/google_news
|
|
69
|
+
import { hackernews } from "../sources/news/hackernews";
|
|
70
|
+
import { yahoo_news } from "../sources/news/yahoo_news";
|
|
71
|
+
import { bing_news } from "../sources/news/bing_news";
|
|
72
|
+
import { google_news } from "../sources/news/google_news";
|
|
73
73
|
|
|
74
74
|
// Academic engines
|
|
75
|
-
import { google_scholar } from "../sources/academic/google_scholar
|
|
76
|
-
import { arxiv } from "../sources/academic/arxiv
|
|
77
|
-
import { wikidata } from "../sources/academic/wikidata
|
|
78
|
-
import { semantic_scholar } from "../sources/academic/semantic_scholar
|
|
79
|
-
import { crossref } from "../sources/academic/crossref
|
|
80
|
-
import { pubmed } from "../sources/academic/pubmed
|
|
81
|
-
import { openalex } from "../sources/academic/openalex
|
|
82
|
-
import { doaj } from "../sources/academic/doaj
|
|
83
|
-
import { core } from "../sources/academic/core
|
|
75
|
+
import { google_scholar } from "../sources/academic/google_scholar";
|
|
76
|
+
import { arxiv } from "../sources/academic/arxiv";
|
|
77
|
+
import { wikidata } from "../sources/academic/wikidata";
|
|
78
|
+
import { semantic_scholar } from "../sources/academic/semantic_scholar";
|
|
79
|
+
import { crossref } from "../sources/academic/crossref";
|
|
80
|
+
import { pubmed } from "../sources/academic/pubmed";
|
|
81
|
+
import { openalex } from "../sources/academic/openalex";
|
|
82
|
+
import { doaj } from "../sources/academic/doaj";
|
|
83
|
+
import { core } from "../sources/academic/core";
|
|
84
84
|
|
|
85
85
|
// Torrent engines
|
|
86
|
-
import { torrent_1337x } from "../sources/torrents/1337x
|
|
87
|
-
import { thepiratebay } from "../sources/torrents/thepiratebay
|
|
88
|
-
import { nyaa } from "../sources/torrents/nyaa
|
|
89
|
-
import { yts } from "../sources/torrents/yts
|
|
90
|
-
import { eztv } from "../sources/torrents/eztv
|
|
91
|
-
import { solidtorrents } from "../sources/torrents/solidtorrents
|
|
92
|
-
import { kickass } from "../sources/torrents/kickass
|
|
86
|
+
import { torrent_1337x } from "../sources/torrents/1337x";
|
|
87
|
+
import { thepiratebay } from "../sources/torrents/thepiratebay";
|
|
88
|
+
import { nyaa } from "../sources/torrents/nyaa";
|
|
89
|
+
import { yts } from "../sources/torrents/yts";
|
|
90
|
+
import { eztv } from "../sources/torrents/eztv";
|
|
91
|
+
import { solidtorrents } from "../sources/torrents/solidtorrents";
|
|
92
|
+
import { kickass } from "../sources/torrents/kickass";
|
|
93
93
|
|
|
94
94
|
// Social media engines
|
|
95
|
-
import { twitter } from "../sources/social/twitter
|
|
96
|
-
import { reddit } from "../sources/social/reddit
|
|
97
|
-
import { medium } from "../sources/social/medium
|
|
98
|
-
import { soundcloud } from "../sources/social/soundcloud
|
|
99
|
-
import { mastodon } from "../sources/social/mastodon
|
|
95
|
+
import { twitter } from "../sources/social/twitter";
|
|
96
|
+
import { reddit } from "../sources/social/reddit";
|
|
97
|
+
import { medium } from "../sources/social/medium";
|
|
98
|
+
import { soundcloud } from "../sources/social/soundcloud";
|
|
99
|
+
import { mastodon } from "../sources/social/mastodon";
|
|
100
100
|
|
|
101
101
|
// Map engines
|
|
102
|
-
import { openstreetmap } from "../sources/maps/openstreetmap
|
|
103
|
-
import { photon } from "../sources/maps/photon
|
|
104
|
-
import { apple_maps } from "../sources/maps/apple_maps
|
|
102
|
+
import { openstreetmap } from "../sources/maps/openstreetmap";
|
|
103
|
+
import { photon } from "../sources/maps/photon";
|
|
104
|
+
import { apple_maps } from "../sources/maps/apple_maps";
|
|
105
105
|
|
|
106
106
|
// Shopping engines
|
|
107
|
-
import { ebay } from "../sources/shopping/ebay
|
|
107
|
+
import { ebay } from "../sources/shopping/ebay";
|
|
108
108
|
|
|
109
109
|
// Specialised engines
|
|
110
|
-
import { wikipedia } from "../sources/specialized/wikipedia
|
|
111
|
-
import { imdb } from "../sources/specialized/imdb
|
|
112
|
-
import { genius } from "../sources/specialized/genius
|
|
113
|
-
import { archive } from "../sources/specialized/archive
|
|
114
|
-
import { openlibrary } from "../sources/specialized/openlibrary
|
|
115
|
-
import { wttr } from "../sources/specialized/wttr
|
|
116
|
-
import { annas_archive } from "../sources/specialized/annas_archive
|
|
117
|
-
import { goodreads } from "../sources/specialized/goodreads
|
|
110
|
+
import { wikipedia } from "../sources/specialized/wikipedia";
|
|
111
|
+
import { imdb } from "../sources/specialized/imdb";
|
|
112
|
+
import { genius } from "../sources/specialized/genius";
|
|
113
|
+
import { archive } from "../sources/specialized/archive";
|
|
114
|
+
import { openlibrary } from "../sources/specialized/openlibrary";
|
|
115
|
+
import { wttr } from "../sources/specialized/wttr";
|
|
116
|
+
import { annas_archive } from "../sources/specialized/annas_archive";
|
|
117
|
+
import { goodreads } from "../sources/specialized/goodreads";
|
|
118
118
|
|
|
119
119
|
export { engineDescriptions };
|
|
120
120
|
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
* deduplicated, ranked list of `MergedResult` objects.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { engineStatusTracker } from "../registry/search-engine-status-tracker
|
|
11
|
-
import { categoryRegistry, CATEGORIES } from "../registry/search-engine-category-registry
|
|
12
|
-
import { ResultContainer } from "./search-result-container
|
|
13
|
-
import { ALL_ENGINES } from "./search-engines-registry-list
|
|
14
|
-
import { MergedResult, CategoryWeight, EngineMetadata } from "../types/search-result-types
|
|
10
|
+
import { engineStatusTracker } from "../registry/search-engine-status-tracker";
|
|
11
|
+
import { categoryRegistry, CATEGORIES } from "../registry/search-engine-category-registry";
|
|
12
|
+
import { ResultContainer } from "./search-result-container";
|
|
13
|
+
import { ALL_ENGINES } from "./search-engines-registry-list";
|
|
14
|
+
import { MergedResult, CategoryWeight, EngineMetadata } from "../types/search-result-types";
|
|
15
15
|
|
|
16
16
|
export class Search {
|
|
17
17
|
private engines: EngineMetadata[] = ALL_ENGINES;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* unresponsive engines, and per-engine timing metrics.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import { EngineResult } from "../types/search-engine-interface
|
|
11
|
+
import { EngineResult } from "../types/search-engine-interface";
|
|
12
12
|
import {
|
|
13
13
|
PriorityType,
|
|
14
14
|
MergedResult,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
UnresponsiveEngine,
|
|
19
19
|
Timing,
|
|
20
20
|
EngineData,
|
|
21
|
-
} from "../types/search-result-types
|
|
21
|
+
} from "../types/search-result-types";
|
|
22
22
|
|
|
23
23
|
export class ResultContainer {
|
|
24
24
|
private mainResultsMap: Map<string, MergedResult> = new Map();
|
package/src/search-web-types.ts
CHANGED
package/src/search.ts
CHANGED
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
* - `search/search-engines-registry-list` — the static catalogue of all 75+
|
|
7
7
|
* engine adapters organised by category.
|
|
8
8
|
*/
|
|
9
|
-
export { Search } from "./search/search-query-executor
|
|
10
|
-
export { ALL_ENGINES } from "./search/search-engines-registry-list
|
|
9
|
+
export { Search } from "./search/search-query-executor";
|
|
10
|
+
export { ALL_ENGINES } from "./search/search-engines-registry-list";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that queries the arXiv API for academic paper search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const arxiv: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the CORE API for open-access academic papers (requires CORE_API_KEY).
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const core: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the Crossref API for scholarly work metadata.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const crossref: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the Directory of Open Access Journals (DOAJ) API.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const doaj: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes Google Scholar search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const google_scholar: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the OpenAlex API for scholarly works, reconstructing abstracts from their inverted index.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
function reconstructAbstract(
|
|
7
7
|
invertedIndex: Record<string, number[]>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes PubMed search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const pubmed: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the Semantic Scholar API for academic papers.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const semantic_scholar: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the Wikidata API for entity search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const wikidata: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes Baidu web search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const baidu: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes Bing web search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const bing: EngineFunction = async (q: string, page?: number) => {
|
|
8
8
|
const params = new URLSearchParams({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes Brave web search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const brave: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes DuckDuckGo HTML search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const duckduckgo: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes Google web search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const google: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes Mojeek web search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const mojeek: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the Qwant search API.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const qwant: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes Startpage web search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const startpage: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes Yahoo web search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const yahoo: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes Yandex web search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const yandex: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes Bing Images search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const bing_images: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes DeviantArt search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const deviantart: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the Flickr API for photo search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const flickr: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that scrapes Google Images search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const google_images: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes Imgur search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const imgur: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes Openclipart search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const openclipart: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the Pixabay API for image search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const pixabay: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the Unsplash API for photo search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const unsplash: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the Wallhaven API for wallpaper search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const wallhaven: EngineFunction = async (
|
|
7
7
|
query: string,
|
package/src/sources/it/crates.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the crates.io API for Rust package search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const crates: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the Docker Hub API for container image search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const dockerhub: EngineFunction = async (
|
|
7
7
|
query: string,
|
package/src/sources/it/github.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the GitHub API for repository search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const github: EngineFunction = async (
|
|
7
7
|
query: string,
|
package/src/sources/it/gitlab.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the GitLab API for project search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const gitlab: EngineFunction = async (
|
|
7
7
|
query: string,
|
package/src/sources/it/npm.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the npm registry search API.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const npm: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the Packagist API for PHP package search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const packagist: EngineFunction = async (
|
|
7
7
|
query: string,
|
package/src/sources/it/pypi.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that scrapes PyPI search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const pypi: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the RubyGems API for gem search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const rubygems: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the Stack Exchange API for Stack Overflow question results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const stackoverflow: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the Apple Maps API for place search results, with automatic access-token caching/renewal.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
// Token management for Apple Maps API
|
|
7
7
|
let tokenCache = {
|