feedscout 1.8.0 → 1.9.0
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 -1
- package/dist/blogrolls/defaults.cjs +16 -10
- package/dist/blogrolls/defaults.d.cts +1 -2
- package/dist/blogrolls/defaults.d.ts +1 -2
- package/dist/blogrolls/defaults.js +17 -10
- package/dist/blogrolls/extractors.cjs +2 -2
- package/dist/blogrolls/extractors.d.cts +2 -2
- package/dist/blogrolls/extractors.d.ts +2 -2
- package/dist/blogrolls/extractors.js +2 -2
- package/dist/blogrolls/index.cjs +9 -10
- package/dist/blogrolls/index.js +4 -5
- package/dist/blogrolls.cjs +1 -2
- package/dist/blogrolls.d.cts +3 -3
- package/dist/blogrolls.d.ts +3 -3
- package/dist/blogrolls.js +3 -3
- package/dist/common/discover/defaults.cjs +46 -0
- package/dist/common/discover/defaults.d.cts +6 -0
- package/dist/common/discover/defaults.d.ts +6 -0
- package/dist/common/discover/defaults.js +44 -0
- package/dist/common/discover/index.cjs +7 -7
- package/dist/common/discover/index.js +2 -2
- package/dist/common/discover/utils.cjs +0 -29
- package/dist/common/discover/utils.d.cts +1 -3
- package/dist/common/discover/utils.d.ts +1 -3
- package/dist/common/discover/utils.js +1 -28
- package/dist/common/locales.cjs +214 -10
- package/dist/common/locales.js +214 -10
- package/dist/common/types.d.cts +3 -2
- package/dist/common/types.d.ts +3 -2
- package/dist/common/uris/html/handlers.cjs +14 -0
- package/dist/common/uris/html/handlers.js +14 -0
- package/dist/common/uris/html/index.cjs +17 -1
- package/dist/common/uris/html/index.js +17 -1
- package/dist/common/uris/html/types.d.cts +5 -4
- package/dist/common/uris/html/types.d.ts +5 -4
- package/dist/common/utils.cjs +12 -11
- package/dist/common/utils.d.cts +6 -4
- package/dist/common/utils.d.ts +6 -4
- package/dist/common/utils.js +13 -11
- package/dist/favicons/extractors.cjs +2 -2
- package/dist/favicons/extractors.d.cts +2 -2
- package/dist/favicons/extractors.d.ts +2 -2
- package/dist/favicons/extractors.js +2 -2
- package/dist/favicons/index.cjs +11 -12
- package/dist/favicons/index.js +4 -5
- package/dist/favicons.cjs +1 -1
- package/dist/favicons.d.cts +2 -2
- package/dist/favicons.d.ts +2 -2
- package/dist/favicons.js +2 -2
- package/dist/feeds/defaults.cjs +121 -9
- package/dist/feeds/defaults.d.cts +4 -3
- package/dist/feeds/defaults.d.ts +4 -3
- package/dist/feeds/defaults.js +121 -10
- package/dist/feeds/extractors.cjs +6 -6
- package/dist/feeds/extractors.d.cts +2 -2
- package/dist/feeds/extractors.d.ts +2 -2
- package/dist/feeds/extractors.js +4 -4
- package/dist/feeds/index.cjs +9 -10
- package/dist/feeds/index.js +4 -5
- package/dist/feeds/platform/handlers/acast.cjs +26 -0
- package/dist/feeds/platform/handlers/acast.js +26 -0
- package/dist/feeds/platform/handlers/ameblo.cjs +36 -0
- package/dist/feeds/platform/handlers/ameblo.js +36 -0
- package/dist/feeds/platform/handlers/applePodcasts.cjs +1 -1
- package/dist/feeds/platform/handlers/applePodcasts.js +1 -1
- package/dist/feeds/platform/handlers/arena.cjs +42 -0
- package/dist/feeds/platform/handlers/arena.js +42 -0
- package/dist/feeds/platform/handlers/artstation.cjs +52 -0
- package/dist/feeds/platform/handlers/artstation.js +52 -0
- package/dist/feeds/platform/handlers/audioboom.cjs +23 -0
- package/dist/feeds/platform/handlers/audioboom.js +23 -0
- package/dist/feeds/platform/handlers/bearblog.cjs +45 -0
- package/dist/feeds/platform/handlers/bearblog.js +45 -0
- package/dist/feeds/platform/handlers/behance.cjs +7 -0
- package/dist/feeds/platform/handlers/behance.js +7 -0
- package/dist/feeds/platform/handlers/blogspot.cjs +38 -2
- package/dist/feeds/platform/handlers/blogspot.js +38 -2
- package/dist/feeds/platform/handlers/bookwyrm.cjs +48 -0
- package/dist/feeds/platform/handlers/bookwyrm.js +48 -0
- package/dist/feeds/platform/handlers/buttondown.cjs +43 -0
- package/dist/feeds/platform/handlers/buttondown.js +43 -0
- package/dist/feeds/platform/handlers/buzzsprout.cjs +22 -0
- package/dist/feeds/platform/handlers/buzzsprout.js +22 -0
- package/dist/feeds/platform/handlers/codeberg.cjs +5 -5
- package/dist/feeds/platform/handlers/codeberg.js +5 -5
- package/dist/feeds/platform/handlers/dailymotion.cjs +16 -0
- package/dist/feeds/platform/handlers/dailymotion.js +16 -0
- package/dist/feeds/platform/handlers/deviantart.cjs +25 -6
- package/dist/feeds/platform/handlers/deviantart.js +25 -6
- package/dist/feeds/platform/handlers/devto.cjs +8 -0
- package/dist/feeds/platform/handlers/devto.js +8 -0
- package/dist/feeds/platform/handlers/discourse.cjs +70 -0
- package/dist/feeds/platform/handlers/discourse.js +70 -0
- package/dist/feeds/platform/handlers/dreamwidth.cjs +48 -0
- package/dist/feeds/platform/handlers/dreamwidth.js +48 -0
- package/dist/feeds/platform/handlers/exblog.cjs +35 -0
- package/dist/feeds/platform/handlers/exblog.js +35 -0
- package/dist/feeds/platform/handlers/fireside.cjs +24 -0
- package/dist/feeds/platform/handlers/fireside.js +24 -0
- package/dist/feeds/platform/handlers/friendica.cjs +44 -0
- package/dist/feeds/platform/handlers/friendica.js +44 -0
- package/dist/feeds/platform/handlers/ghost.cjs +30 -0
- package/dist/feeds/platform/handlers/ghost.js +30 -0
- package/dist/feeds/platform/handlers/github.cjs +6 -0
- package/dist/feeds/platform/handlers/github.js +6 -0
- package/dist/feeds/platform/handlers/githubGist.cjs +16 -5
- package/dist/feeds/platform/handlers/githubGist.js +16 -5
- package/dist/feeds/platform/handlers/gitlab.cjs +31 -13
- package/dist/feeds/platform/handlers/gitlab.js +31 -13
- package/dist/feeds/platform/handlers/goodreads.cjs +18 -8
- package/dist/feeds/platform/handlers/goodreads.js +18 -8
- package/dist/feeds/platform/handlers/hackernews.cjs +21 -0
- package/dist/feeds/platform/handlers/hackernews.js +21 -0
- package/dist/feeds/platform/handlers/hashnode.cjs +1 -1
- package/dist/feeds/platform/handlers/hashnode.js +1 -1
- package/dist/feeds/platform/handlers/hatenablog.cjs +4 -1
- package/dist/feeds/platform/handlers/hatenablog.js +4 -1
- package/dist/feeds/platform/handlers/hearthis.cjs +32 -0
- package/dist/feeds/platform/handlers/hearthis.js +32 -0
- package/dist/feeds/platform/handlers/heyWorld.cjs +18 -0
- package/dist/feeds/platform/handlers/heyWorld.js +18 -0
- package/dist/feeds/platform/handlers/insanejournal.cjs +69 -0
- package/dist/feeds/platform/handlers/insanejournal.js +69 -0
- package/dist/feeds/platform/handlers/itchio.cjs +24 -1
- package/dist/feeds/platform/handlers/itchio.js +24 -1
- package/dist/feeds/platform/handlers/lemmy.cjs +46 -4
- package/dist/feeds/platform/handlers/lemmy.js +46 -4
- package/dist/feeds/platform/handlers/letterboxd.cjs +4 -0
- package/dist/feeds/platform/handlers/letterboxd.js +4 -0
- package/dist/feeds/platform/handlers/libsyn.cjs +25 -0
- package/dist/feeds/platform/handlers/libsyn.js +25 -0
- package/dist/feeds/platform/handlers/listed.cjs +20 -0
- package/dist/feeds/platform/handlers/listed.js +20 -0
- package/dist/feeds/platform/handlers/livejournal.cjs +68 -0
- package/dist/feeds/platform/handlers/livejournal.js +68 -0
- package/dist/feeds/platform/handlers/mastodon.cjs +32 -0
- package/dist/feeds/platform/handlers/mastodon.js +32 -0
- package/dist/feeds/platform/handlers/mataroa.cjs +16 -0
- package/dist/feeds/platform/handlers/mataroa.js +16 -0
- package/dist/feeds/platform/handlers/medium.cjs +2 -2
- package/dist/feeds/platform/handlers/medium.js +2 -2
- package/dist/feeds/platform/handlers/microblog.cjs +55 -0
- package/dist/feeds/platform/handlers/microblog.js +55 -0
- package/dist/feeds/platform/handlers/misskey.cjs +40 -0
- package/dist/feeds/platform/handlers/misskey.js +40 -0
- package/dist/feeds/platform/handlers/myanimelist.cjs +43 -0
- package/dist/feeds/platform/handlers/myanimelist.js +43 -0
- package/dist/feeds/platform/handlers/naverBlog.cjs +21 -0
- package/dist/feeds/platform/handlers/naverBlog.js +21 -0
- package/dist/feeds/platform/handlers/nebula.cjs +68 -0
- package/dist/feeds/platform/handlers/nebula.js +68 -0
- package/dist/feeds/platform/handlers/note.cjs +53 -0
- package/dist/feeds/platform/handlers/note.js +53 -0
- package/dist/feeds/platform/handlers/observable.cjs +34 -0
- package/dist/feeds/platform/handlers/observable.js +34 -0
- package/dist/feeds/platform/handlers/odysee.cjs +20 -0
- package/dist/feeds/platform/handlers/odysee.js +20 -0
- package/dist/feeds/platform/handlers/pagecord.cjs +16 -0
- package/dist/feeds/platform/handlers/pagecord.js +16 -0
- package/dist/feeds/platform/handlers/paragraph.cjs +1 -2
- package/dist/feeds/platform/handlers/paragraph.js +1 -2
- package/dist/feeds/platform/handlers/pika.cjs +35 -0
- package/dist/feeds/platform/handlers/pika.js +35 -0
- package/dist/feeds/platform/handlers/pinterest.cjs +13 -0
- package/dist/feeds/platform/handlers/pinterest.js +13 -0
- package/dist/feeds/platform/handlers/pixelfed.cjs +46 -0
- package/dist/feeds/platform/handlers/pixelfed.js +46 -0
- package/dist/feeds/platform/handlers/pleroma.cjs +34 -0
- package/dist/feeds/platform/handlers/pleroma.js +34 -0
- package/dist/feeds/platform/handlers/podbean.cjs +29 -0
- package/dist/feeds/platform/handlers/podbean.js +29 -0
- package/dist/feeds/platform/handlers/podigee.cjs +29 -0
- package/dist/feeds/platform/handlers/podigee.js +29 -0
- package/dist/feeds/platform/handlers/posthaven.cjs +24 -0
- package/dist/feeds/platform/handlers/posthaven.js +24 -0
- package/dist/feeds/platform/handlers/prose.cjs +26 -0
- package/dist/feeds/platform/handlers/prose.js +26 -0
- package/dist/feeds/platform/handlers/qiita.cjs +58 -0
- package/dist/feeds/platform/handlers/qiita.js +58 -0
- package/dist/feeds/platform/handlers/reddit.cjs +83 -9
- package/dist/feeds/platform/handlers/reddit.js +83 -9
- package/dist/feeds/platform/handlers/rssCom.cjs +20 -0
- package/dist/feeds/platform/handlers/rssCom.js +20 -0
- package/dist/feeds/platform/handlers/seesaa.cjs +22 -0
- package/dist/feeds/platform/handlers/seesaa.js +22 -0
- package/dist/feeds/platform/handlers/sourceforge.cjs +37 -4
- package/dist/feeds/platform/handlers/sourceforge.js +37 -4
- package/dist/feeds/platform/handlers/spreaker.cjs +21 -0
- package/dist/feeds/platform/handlers/spreaker.js +21 -0
- package/dist/feeds/platform/handlers/stackExchange.cjs +26 -2
- package/dist/feeds/platform/handlers/stackExchange.js +26 -2
- package/dist/feeds/platform/handlers/steam.cjs +7 -0
- package/dist/feeds/platform/handlers/steam.js +7 -0
- package/dist/feeds/platform/handlers/tildes.cjs +41 -0
- package/dist/feeds/platform/handlers/tildes.js +41 -0
- package/dist/feeds/platform/handlers/tistory.cjs +16 -0
- package/dist/feeds/platform/handlers/tistory.js +16 -0
- package/dist/feeds/platform/handlers/transistor.cjs +29 -0
- package/dist/feeds/platform/handlers/transistor.js +29 -0
- package/dist/feeds/platform/handlers/velog.cjs +24 -0
- package/dist/feeds/platform/handlers/velog.js +24 -0
- package/dist/feeds/platform/handlers/vimeo.cjs +6 -0
- package/dist/feeds/platform/handlers/vimeo.js +6 -0
- package/dist/feeds/platform/handlers/weblogLol.cjs +26 -0
- package/dist/feeds/platform/handlers/weblogLol.js +26 -0
- package/dist/feeds/platform/handlers/weebly.cjs +25 -0
- package/dist/feeds/platform/handlers/weebly.js +25 -0
- package/dist/feeds/platform/handlers/wordpress.cjs +173 -28
- package/dist/feeds/platform/handlers/wordpress.js +173 -28
- package/dist/feeds/platform/handlers/writeas.cjs +51 -0
- package/dist/feeds/platform/handlers/writeas.js +51 -0
- package/dist/feeds/platform/handlers/ximalaya.cjs +1 -1
- package/dist/feeds/platform/handlers/ximalaya.js +1 -1
- package/dist/feeds/platform/handlers/youtube.cjs +4 -1
- package/dist/feeds/platform/handlers/youtube.js +4 -1
- package/dist/feeds/platform/handlers/zenn.cjs +54 -0
- package/dist/feeds/platform/handlers/zenn.js +54 -0
- package/dist/feeds.cjs +2 -1
- package/dist/feeds.d.cts +3 -3
- package/dist/feeds.d.ts +3 -3
- package/dist/feeds.js +3 -3
- package/dist/hubs/discover/index.cjs +4 -4
- package/dist/hubs/discover/index.js +3 -3
- package/dist/hubs/feed/index.cjs +2 -2
- package/dist/hubs/feed/index.js +2 -2
- package/dist/hubs/headers/index.cjs +2 -2
- package/dist/hubs/headers/index.js +2 -2
- package/dist/hubs/html/index.cjs +2 -2
- package/dist/hubs/html/index.js +2 -2
- package/dist/index.cjs +2 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/utils.d.cts +2 -1
- package/dist/utils.d.ts +2 -1
- package/package.json +6 -7
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { composeHint, isHostOf } from "../../../common/utils.js";
|
|
2
|
+
//#region src/feeds/platform/handlers/rssCom.ts
|
|
3
|
+
const hosts = ["rss.com", "www.rss.com"];
|
|
4
|
+
const podcastRegex = /^\/(?:[a-z]{2}\/)?podcasts\/([^/]+)/;
|
|
5
|
+
const rssComHandler = {
|
|
6
|
+
match: (url) => {
|
|
7
|
+
return isHostOf(url, hosts);
|
|
8
|
+
},
|
|
9
|
+
resolve: (url) => {
|
|
10
|
+
const { pathname } = new URL(url);
|
|
11
|
+
const match = pathname.match(podcastRegex);
|
|
12
|
+
if (!match?.[1]) return [];
|
|
13
|
+
return [{
|
|
14
|
+
uri: `https://media.rss.com/${match[1]}/feed.xml`,
|
|
15
|
+
hint: composeHint("rss-com:podcast")
|
|
16
|
+
}];
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { rssComHandler };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const require_utils = require("../../../common/utils.cjs");
|
|
2
|
+
//#region src/feeds/platform/handlers/seesaa.ts
|
|
3
|
+
const seesaaHandler = {
|
|
4
|
+
match: (url) => {
|
|
5
|
+
return require_utils.isSubdomainOf(url, "seesaa.net");
|
|
6
|
+
},
|
|
7
|
+
resolve: (url) => {
|
|
8
|
+
const { origin } = new URL(url);
|
|
9
|
+
const uris = [];
|
|
10
|
+
uris.push({
|
|
11
|
+
uri: `${origin}/index20.rdf`,
|
|
12
|
+
hint: require_utils.composeHint("seesaa:posts-rss2")
|
|
13
|
+
});
|
|
14
|
+
uris.push({
|
|
15
|
+
uri: `${origin}/index.rdf`,
|
|
16
|
+
hint: require_utils.composeHint("seesaa:posts-rdf")
|
|
17
|
+
});
|
|
18
|
+
return uris;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
exports.seesaaHandler = seesaaHandler;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { composeHint, isSubdomainOf } from "../../../common/utils.js";
|
|
2
|
+
//#region src/feeds/platform/handlers/seesaa.ts
|
|
3
|
+
const seesaaHandler = {
|
|
4
|
+
match: (url) => {
|
|
5
|
+
return isSubdomainOf(url, "seesaa.net");
|
|
6
|
+
},
|
|
7
|
+
resolve: (url) => {
|
|
8
|
+
const { origin } = new URL(url);
|
|
9
|
+
const uris = [];
|
|
10
|
+
uris.push({
|
|
11
|
+
uri: `${origin}/index20.rdf`,
|
|
12
|
+
hint: composeHint("seesaa:posts-rss2")
|
|
13
|
+
});
|
|
14
|
+
uris.push({
|
|
15
|
+
uri: `${origin}/index.rdf`,
|
|
16
|
+
hint: composeHint("seesaa:posts-rdf")
|
|
17
|
+
});
|
|
18
|
+
return uris;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { seesaaHandler };
|
|
@@ -8,10 +8,43 @@ const sourceforgeHandler = {
|
|
|
8
8
|
resolve: (url) => {
|
|
9
9
|
const { origin, pathname } = new URL(url);
|
|
10
10
|
const pathSegments = pathname.split("/").filter(Boolean);
|
|
11
|
-
if (pathSegments[0] === "projects" && pathSegments[1])
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
if ((pathSegments[0] === "projects" || pathSegments[0] === "p") && pathSegments[1]) {
|
|
12
|
+
const project = pathSegments[1];
|
|
13
|
+
return [
|
|
14
|
+
{
|
|
15
|
+
uri: `${origin}/p/${project}/activity/feed`,
|
|
16
|
+
hint: require_utils.composeHint("sourceforge:activity")
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
uri: `${origin}/p/${project}/feed`,
|
|
20
|
+
hint: require_utils.composeHint("sourceforge:project-feed")
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
uri: `${origin}/projects/${project}/rss`,
|
|
24
|
+
hint: require_utils.composeHint("sourceforge:files")
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
uri: `${origin}/p/${project}/news/feed.rss`,
|
|
28
|
+
hint: require_utils.composeHint("sourceforge:news-rss")
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
uri: `${origin}/p/${project}/news/feed.atom`,
|
|
32
|
+
hint: require_utils.composeHint("sourceforge:news-atom")
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
uri: `${origin}/p/${project}/discussion/feed`,
|
|
36
|
+
hint: require_utils.composeHint("sourceforge:discussion")
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
uri: `${origin}/p/${project}/discussion/feed.atom`,
|
|
40
|
+
hint: require_utils.composeHint("sourceforge:discussion-atom")
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
uri: `${origin}/p/${project}/bugs/feed`,
|
|
44
|
+
hint: require_utils.composeHint("sourceforge:bugs")
|
|
45
|
+
}
|
|
46
|
+
];
|
|
47
|
+
}
|
|
15
48
|
return [];
|
|
16
49
|
}
|
|
17
50
|
};
|
|
@@ -8,10 +8,43 @@ const sourceforgeHandler = {
|
|
|
8
8
|
resolve: (url) => {
|
|
9
9
|
const { origin, pathname } = new URL(url);
|
|
10
10
|
const pathSegments = pathname.split("/").filter(Boolean);
|
|
11
|
-
if (pathSegments[0] === "projects" && pathSegments[1])
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
if ((pathSegments[0] === "projects" || pathSegments[0] === "p") && pathSegments[1]) {
|
|
12
|
+
const project = pathSegments[1];
|
|
13
|
+
return [
|
|
14
|
+
{
|
|
15
|
+
uri: `${origin}/p/${project}/activity/feed`,
|
|
16
|
+
hint: composeHint("sourceforge:activity")
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
uri: `${origin}/p/${project}/feed`,
|
|
20
|
+
hint: composeHint("sourceforge:project-feed")
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
uri: `${origin}/projects/${project}/rss`,
|
|
24
|
+
hint: composeHint("sourceforge:files")
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
uri: `${origin}/p/${project}/news/feed.rss`,
|
|
28
|
+
hint: composeHint("sourceforge:news-rss")
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
uri: `${origin}/p/${project}/news/feed.atom`,
|
|
32
|
+
hint: composeHint("sourceforge:news-atom")
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
uri: `${origin}/p/${project}/discussion/feed`,
|
|
36
|
+
hint: composeHint("sourceforge:discussion")
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
uri: `${origin}/p/${project}/discussion/feed.atom`,
|
|
40
|
+
hint: composeHint("sourceforge:discussion-atom")
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
uri: `${origin}/p/${project}/bugs/feed`,
|
|
44
|
+
hint: composeHint("sourceforge:bugs")
|
|
45
|
+
}
|
|
46
|
+
];
|
|
47
|
+
}
|
|
15
48
|
return [];
|
|
16
49
|
}
|
|
17
50
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const require_utils = require("../../../common/utils.cjs");
|
|
2
|
+
//#region src/feeds/platform/handlers/spreaker.ts
|
|
3
|
+
const hosts = ["spreaker.com", "www.spreaker.com"];
|
|
4
|
+
const podcastRegex = /^\/podcast\/[\w-]+--(\d+)/;
|
|
5
|
+
const showRegex = /^\/show\/(\d+)(?:\/|$)/;
|
|
6
|
+
const spreakerHandler = {
|
|
7
|
+
match: (url) => {
|
|
8
|
+
return require_utils.isHostOf(url, hosts);
|
|
9
|
+
},
|
|
10
|
+
resolve: (url) => {
|
|
11
|
+
const { pathname } = new URL(url);
|
|
12
|
+
const id = pathname.match(podcastRegex)?.[1] ?? pathname.match(showRegex)?.[1];
|
|
13
|
+
if (!id) return [];
|
|
14
|
+
return [{
|
|
15
|
+
uri: `https://www.spreaker.com/show/${id}/episodes/feed`,
|
|
16
|
+
hint: require_utils.composeHint("spreaker:podcast")
|
|
17
|
+
}];
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
exports.spreakerHandler = spreakerHandler;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { composeHint, isHostOf } from "../../../common/utils.js";
|
|
2
|
+
//#region src/feeds/platform/handlers/spreaker.ts
|
|
3
|
+
const hosts = ["spreaker.com", "www.spreaker.com"];
|
|
4
|
+
const podcastRegex = /^\/podcast\/[\w-]+--(\d+)/;
|
|
5
|
+
const showRegex = /^\/show\/(\d+)(?:\/|$)/;
|
|
6
|
+
const spreakerHandler = {
|
|
7
|
+
match: (url) => {
|
|
8
|
+
return isHostOf(url, hosts);
|
|
9
|
+
},
|
|
10
|
+
resolve: (url) => {
|
|
11
|
+
const { pathname } = new URL(url);
|
|
12
|
+
const id = pathname.match(podcastRegex)?.[1] ?? pathname.match(showRegex)?.[1];
|
|
13
|
+
if (!id) return [];
|
|
14
|
+
return [{
|
|
15
|
+
uri: `https://www.spreaker.com/show/${id}/episodes/feed`,
|
|
16
|
+
hint: composeHint("spreaker:podcast")
|
|
17
|
+
}];
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { spreakerHandler };
|
|
@@ -3,6 +3,7 @@ const require_utils = require("../../../common/utils.cjs");
|
|
|
3
3
|
const tagRegex = /^\/questions\/tagged\/([\w.+-]+)/;
|
|
4
4
|
const questionRegex = /^\/questions\/(\d+)/;
|
|
5
5
|
const userRegex = /^\/users\/(\d+)/;
|
|
6
|
+
const collectiveRegex = /^\/collectives\/([^/]+)/;
|
|
6
7
|
const domains = [
|
|
7
8
|
"stackoverflow.com",
|
|
8
9
|
"serverfault.com",
|
|
@@ -12,15 +13,29 @@ const domains = [
|
|
|
12
13
|
"mathoverflow.net",
|
|
13
14
|
"stackexchange.com"
|
|
14
15
|
];
|
|
16
|
+
const validSorts = new Set([
|
|
17
|
+
"newest",
|
|
18
|
+
"active",
|
|
19
|
+
"votes",
|
|
20
|
+
"creation",
|
|
21
|
+
"hot",
|
|
22
|
+
"week",
|
|
23
|
+
"month"
|
|
24
|
+
]);
|
|
25
|
+
const getSortSuffix = (searchParams) => {
|
|
26
|
+
const sort = searchParams.get("sort") ?? searchParams.get("tab")?.toLowerCase();
|
|
27
|
+
if (sort && validSorts.has(sort)) return `?sort=${sort}`;
|
|
28
|
+
return "";
|
|
29
|
+
};
|
|
15
30
|
const stackExchangeHandler = {
|
|
16
31
|
match: (url) => {
|
|
17
32
|
return require_utils.isHostOf(url, domains) || require_utils.isSubdomainOf(url, domains);
|
|
18
33
|
},
|
|
19
34
|
resolve: (url) => {
|
|
20
|
-
const { origin, pathname } = new URL(url);
|
|
35
|
+
const { origin, pathname, searchParams } = new URL(url);
|
|
21
36
|
const tagMatch = pathname.match(tagRegex);
|
|
22
37
|
if (tagMatch?.[1]) return [{
|
|
23
|
-
uri: `${origin}/feeds/tag/${tagMatch[1]}`,
|
|
38
|
+
uri: `${origin}/feeds/tag/${tagMatch[1]}${getSortSuffix(searchParams)}`,
|
|
24
39
|
hint: require_utils.composeHint("stackexchange:tag")
|
|
25
40
|
}];
|
|
26
41
|
const questionMatch = pathname.match(questionRegex);
|
|
@@ -33,6 +48,15 @@ const stackExchangeHandler = {
|
|
|
33
48
|
uri: `${origin}/feeds/user/${userMatch[1]}`,
|
|
34
49
|
hint: require_utils.composeHint("stackexchange:user")
|
|
35
50
|
}];
|
|
51
|
+
const collectiveMatch = pathname.match(collectiveRegex);
|
|
52
|
+
if (collectiveMatch?.[1]) return [{
|
|
53
|
+
uri: `${origin}/feeds/collectives/${collectiveMatch[1]}`,
|
|
54
|
+
hint: require_utils.composeHint("stackexchange:collective")
|
|
55
|
+
}];
|
|
56
|
+
if (pathname === "/" || pathname === "") return [{
|
|
57
|
+
uri: `${origin}/feeds`,
|
|
58
|
+
hint: require_utils.composeHint("stackexchange:newest")
|
|
59
|
+
}];
|
|
36
60
|
return [];
|
|
37
61
|
}
|
|
38
62
|
};
|
|
@@ -3,6 +3,7 @@ import { composeHint, isHostOf, isSubdomainOf } from "../../../common/utils.js";
|
|
|
3
3
|
const tagRegex = /^\/questions\/tagged\/([\w.+-]+)/;
|
|
4
4
|
const questionRegex = /^\/questions\/(\d+)/;
|
|
5
5
|
const userRegex = /^\/users\/(\d+)/;
|
|
6
|
+
const collectiveRegex = /^\/collectives\/([^/]+)/;
|
|
6
7
|
const domains = [
|
|
7
8
|
"stackoverflow.com",
|
|
8
9
|
"serverfault.com",
|
|
@@ -12,15 +13,29 @@ const domains = [
|
|
|
12
13
|
"mathoverflow.net",
|
|
13
14
|
"stackexchange.com"
|
|
14
15
|
];
|
|
16
|
+
const validSorts = new Set([
|
|
17
|
+
"newest",
|
|
18
|
+
"active",
|
|
19
|
+
"votes",
|
|
20
|
+
"creation",
|
|
21
|
+
"hot",
|
|
22
|
+
"week",
|
|
23
|
+
"month"
|
|
24
|
+
]);
|
|
25
|
+
const getSortSuffix = (searchParams) => {
|
|
26
|
+
const sort = searchParams.get("sort") ?? searchParams.get("tab")?.toLowerCase();
|
|
27
|
+
if (sort && validSorts.has(sort)) return `?sort=${sort}`;
|
|
28
|
+
return "";
|
|
29
|
+
};
|
|
15
30
|
const stackExchangeHandler = {
|
|
16
31
|
match: (url) => {
|
|
17
32
|
return isHostOf(url, domains) || isSubdomainOf(url, domains);
|
|
18
33
|
},
|
|
19
34
|
resolve: (url) => {
|
|
20
|
-
const { origin, pathname } = new URL(url);
|
|
35
|
+
const { origin, pathname, searchParams } = new URL(url);
|
|
21
36
|
const tagMatch = pathname.match(tagRegex);
|
|
22
37
|
if (tagMatch?.[1]) return [{
|
|
23
|
-
uri: `${origin}/feeds/tag/${tagMatch[1]}`,
|
|
38
|
+
uri: `${origin}/feeds/tag/${tagMatch[1]}${getSortSuffix(searchParams)}`,
|
|
24
39
|
hint: composeHint("stackexchange:tag")
|
|
25
40
|
}];
|
|
26
41
|
const questionMatch = pathname.match(questionRegex);
|
|
@@ -33,6 +48,15 @@ const stackExchangeHandler = {
|
|
|
33
48
|
uri: `${origin}/feeds/user/${userMatch[1]}`,
|
|
34
49
|
hint: composeHint("stackexchange:user")
|
|
35
50
|
}];
|
|
51
|
+
const collectiveMatch = pathname.match(collectiveRegex);
|
|
52
|
+
if (collectiveMatch?.[1]) return [{
|
|
53
|
+
uri: `${origin}/feeds/collectives/${collectiveMatch[1]}`,
|
|
54
|
+
hint: composeHint("stackexchange:collective")
|
|
55
|
+
}];
|
|
56
|
+
if (pathname === "/" || pathname === "") return [{
|
|
57
|
+
uri: `${origin}/feeds`,
|
|
58
|
+
hint: composeHint("stackexchange:newest")
|
|
59
|
+
}];
|
|
36
60
|
return [];
|
|
37
61
|
}
|
|
38
62
|
};
|
|
@@ -21,6 +21,13 @@ const steamHandler = {
|
|
|
21
21
|
hint: require_utils.composeHint("steam:group")
|
|
22
22
|
}];
|
|
23
23
|
}
|
|
24
|
+
if (hostname === "store.steampowered.com" && (pathname === "/" || pathname === "" || pathname.startsWith("/news"))) return [{
|
|
25
|
+
uri: "https://store.steampowered.com/feeds/news.xml",
|
|
26
|
+
hint: require_utils.composeHint("steam:news-global")
|
|
27
|
+
}, {
|
|
28
|
+
uri: "https://store.steampowered.com/feeds/daily_deals.xml",
|
|
29
|
+
hint: require_utils.composeHint("steam:daily-deals")
|
|
30
|
+
}];
|
|
24
31
|
return [];
|
|
25
32
|
}
|
|
26
33
|
};
|
|
@@ -21,6 +21,13 @@ const steamHandler = {
|
|
|
21
21
|
hint: composeHint("steam:group")
|
|
22
22
|
}];
|
|
23
23
|
}
|
|
24
|
+
if (hostname === "store.steampowered.com" && (pathname === "/" || pathname === "" || pathname.startsWith("/news"))) return [{
|
|
25
|
+
uri: "https://store.steampowered.com/feeds/news.xml",
|
|
26
|
+
hint: composeHint("steam:news-global")
|
|
27
|
+
}, {
|
|
28
|
+
uri: "https://store.steampowered.com/feeds/daily_deals.xml",
|
|
29
|
+
hint: composeHint("steam:daily-deals")
|
|
30
|
+
}];
|
|
24
31
|
return [];
|
|
25
32
|
}
|
|
26
33
|
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const require_utils = require("../../../common/utils.cjs");
|
|
2
|
+
//#region src/feeds/platform/handlers/tildes.ts
|
|
3
|
+
const hosts = ["tildes.net", "www.tildes.net"];
|
|
4
|
+
const groupRegex = /^\/~([^/]+)/;
|
|
5
|
+
const tildesHandler = {
|
|
6
|
+
match: (url) => {
|
|
7
|
+
return require_utils.isHostOf(url, hosts);
|
|
8
|
+
},
|
|
9
|
+
resolve: (url) => {
|
|
10
|
+
const { pathname, searchParams } = new URL(url);
|
|
11
|
+
const groupMatch = pathname.match(groupRegex);
|
|
12
|
+
const uris = [];
|
|
13
|
+
const tag = searchParams.get("tag");
|
|
14
|
+
const tagSuffix = tag ? `?tag=${encodeURIComponent(tag)}` : "";
|
|
15
|
+
if (groupMatch?.[1]) {
|
|
16
|
+
const group = groupMatch[1];
|
|
17
|
+
uris.push({
|
|
18
|
+
uri: `https://tildes.net/~${group}/topics.rss${tagSuffix}`,
|
|
19
|
+
hint: require_utils.composeHint("tildes:group-rss")
|
|
20
|
+
});
|
|
21
|
+
uris.push({
|
|
22
|
+
uri: `https://tildes.net/~${group}/topics.atom${tagSuffix}`,
|
|
23
|
+
hint: require_utils.composeHint("tildes:group-atom")
|
|
24
|
+
});
|
|
25
|
+
return uris;
|
|
26
|
+
}
|
|
27
|
+
if (pathname === "/" || pathname === "") {
|
|
28
|
+
uris.push({
|
|
29
|
+
uri: `https://tildes.net/topics.rss${tagSuffix}`,
|
|
30
|
+
hint: require_utils.composeHint("tildes:topics-rss")
|
|
31
|
+
});
|
|
32
|
+
uris.push({
|
|
33
|
+
uri: `https://tildes.net/topics.atom${tagSuffix}`,
|
|
34
|
+
hint: require_utils.composeHint("tildes:topics-atom")
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
return uris;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
41
|
+
exports.tildesHandler = tildesHandler;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { composeHint, isHostOf } from "../../../common/utils.js";
|
|
2
|
+
//#region src/feeds/platform/handlers/tildes.ts
|
|
3
|
+
const hosts = ["tildes.net", "www.tildes.net"];
|
|
4
|
+
const groupRegex = /^\/~([^/]+)/;
|
|
5
|
+
const tildesHandler = {
|
|
6
|
+
match: (url) => {
|
|
7
|
+
return isHostOf(url, hosts);
|
|
8
|
+
},
|
|
9
|
+
resolve: (url) => {
|
|
10
|
+
const { pathname, searchParams } = new URL(url);
|
|
11
|
+
const groupMatch = pathname.match(groupRegex);
|
|
12
|
+
const uris = [];
|
|
13
|
+
const tag = searchParams.get("tag");
|
|
14
|
+
const tagSuffix = tag ? `?tag=${encodeURIComponent(tag)}` : "";
|
|
15
|
+
if (groupMatch?.[1]) {
|
|
16
|
+
const group = groupMatch[1];
|
|
17
|
+
uris.push({
|
|
18
|
+
uri: `https://tildes.net/~${group}/topics.rss${tagSuffix}`,
|
|
19
|
+
hint: composeHint("tildes:group-rss")
|
|
20
|
+
});
|
|
21
|
+
uris.push({
|
|
22
|
+
uri: `https://tildes.net/~${group}/topics.atom${tagSuffix}`,
|
|
23
|
+
hint: composeHint("tildes:group-atom")
|
|
24
|
+
});
|
|
25
|
+
return uris;
|
|
26
|
+
}
|
|
27
|
+
if (pathname === "/" || pathname === "") {
|
|
28
|
+
uris.push({
|
|
29
|
+
uri: `https://tildes.net/topics.rss${tagSuffix}`,
|
|
30
|
+
hint: composeHint("tildes:topics-rss")
|
|
31
|
+
});
|
|
32
|
+
uris.push({
|
|
33
|
+
uri: `https://tildes.net/topics.atom${tagSuffix}`,
|
|
34
|
+
hint: composeHint("tildes:topics-atom")
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
return uris;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
41
|
+
export { tildesHandler };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const require_utils = require("../../../common/utils.cjs");
|
|
2
|
+
//#region src/feeds/platform/handlers/tistory.ts
|
|
3
|
+
const tistoryHandler = {
|
|
4
|
+
match: (url) => {
|
|
5
|
+
return require_utils.isSubdomainOf(url, "tistory.com");
|
|
6
|
+
},
|
|
7
|
+
resolve: (url) => {
|
|
8
|
+
const { origin } = new URL(url);
|
|
9
|
+
return [{
|
|
10
|
+
uri: `${origin}/rss`,
|
|
11
|
+
hint: require_utils.composeHint("tistory:blog")
|
|
12
|
+
}];
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
exports.tistoryHandler = tistoryHandler;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { composeHint, isSubdomainOf } from "../../../common/utils.js";
|
|
2
|
+
//#region src/feeds/platform/handlers/tistory.ts
|
|
3
|
+
const tistoryHandler = {
|
|
4
|
+
match: (url) => {
|
|
5
|
+
return isSubdomainOf(url, "tistory.com");
|
|
6
|
+
},
|
|
7
|
+
resolve: (url) => {
|
|
8
|
+
const { origin } = new URL(url);
|
|
9
|
+
return [{
|
|
10
|
+
uri: `${origin}/rss`,
|
|
11
|
+
hint: composeHint("tistory:blog")
|
|
12
|
+
}];
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { tistoryHandler };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const require_utils = require("../../../common/utils.cjs");
|
|
2
|
+
//#region src/feeds/platform/handlers/transistor.ts
|
|
3
|
+
const domainSuffix = /\.transistor\.fm$/i;
|
|
4
|
+
const reservedSlugs = new Set([
|
|
5
|
+
"www",
|
|
6
|
+
"feeds",
|
|
7
|
+
"share",
|
|
8
|
+
"support",
|
|
9
|
+
"help",
|
|
10
|
+
"developers",
|
|
11
|
+
"api",
|
|
12
|
+
"cdn"
|
|
13
|
+
]);
|
|
14
|
+
const transistorHandler = {
|
|
15
|
+
match: (url) => {
|
|
16
|
+
if (!require_utils.isSubdomainOf(url, "transistor.fm")) return false;
|
|
17
|
+
const slug = new URL(url).hostname.toLowerCase().replace(domainSuffix, "");
|
|
18
|
+
return !reservedSlugs.has(slug);
|
|
19
|
+
},
|
|
20
|
+
resolve: (url) => {
|
|
21
|
+
const { hostname } = new URL(url);
|
|
22
|
+
return [{
|
|
23
|
+
uri: `https://feeds.transistor.fm/${hostname.replace(domainSuffix, "")}`,
|
|
24
|
+
hint: require_utils.composeHint("transistor:podcast")
|
|
25
|
+
}];
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
exports.transistorHandler = transistorHandler;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { composeHint, isSubdomainOf } from "../../../common/utils.js";
|
|
2
|
+
//#region src/feeds/platform/handlers/transistor.ts
|
|
3
|
+
const domainSuffix = /\.transistor\.fm$/i;
|
|
4
|
+
const reservedSlugs = new Set([
|
|
5
|
+
"www",
|
|
6
|
+
"feeds",
|
|
7
|
+
"share",
|
|
8
|
+
"support",
|
|
9
|
+
"help",
|
|
10
|
+
"developers",
|
|
11
|
+
"api",
|
|
12
|
+
"cdn"
|
|
13
|
+
]);
|
|
14
|
+
const transistorHandler = {
|
|
15
|
+
match: (url) => {
|
|
16
|
+
if (!isSubdomainOf(url, "transistor.fm")) return false;
|
|
17
|
+
const slug = new URL(url).hostname.toLowerCase().replace(domainSuffix, "");
|
|
18
|
+
return !reservedSlugs.has(slug);
|
|
19
|
+
},
|
|
20
|
+
resolve: (url) => {
|
|
21
|
+
const { hostname } = new URL(url);
|
|
22
|
+
return [{
|
|
23
|
+
uri: `https://feeds.transistor.fm/${hostname.replace(domainSuffix, "")}`,
|
|
24
|
+
hint: composeHint("transistor:podcast")
|
|
25
|
+
}];
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { transistorHandler };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const require_utils = require("../../../common/utils.cjs");
|
|
2
|
+
//#region src/feeds/platform/handlers/velog.ts
|
|
3
|
+
const hosts = ["velog.io", "www.velog.io"];
|
|
4
|
+
const userRegex = /^\/@([^/]+)/;
|
|
5
|
+
const velogHandler = {
|
|
6
|
+
match: (url) => {
|
|
7
|
+
return require_utils.isHostOf(url, hosts);
|
|
8
|
+
},
|
|
9
|
+
resolve: (url) => {
|
|
10
|
+
const { pathname } = new URL(url);
|
|
11
|
+
const userMatch = pathname.match(userRegex);
|
|
12
|
+
if (userMatch?.[1]) return [{
|
|
13
|
+
uri: `https://v2.velog.io/rss/${userMatch[1]}`,
|
|
14
|
+
hint: require_utils.composeHint("velog:posts")
|
|
15
|
+
}];
|
|
16
|
+
if (pathname === "/" || pathname === "") return [{
|
|
17
|
+
uri: "https://v2.velog.io/rss",
|
|
18
|
+
hint: require_utils.composeHint("velog:trending")
|
|
19
|
+
}];
|
|
20
|
+
return [];
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
exports.velogHandler = velogHandler;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { composeHint, isHostOf } from "../../../common/utils.js";
|
|
2
|
+
//#region src/feeds/platform/handlers/velog.ts
|
|
3
|
+
const hosts = ["velog.io", "www.velog.io"];
|
|
4
|
+
const userRegex = /^\/@([^/]+)/;
|
|
5
|
+
const velogHandler = {
|
|
6
|
+
match: (url) => {
|
|
7
|
+
return isHostOf(url, hosts);
|
|
8
|
+
},
|
|
9
|
+
resolve: (url) => {
|
|
10
|
+
const { pathname } = new URL(url);
|
|
11
|
+
const userMatch = pathname.match(userRegex);
|
|
12
|
+
if (userMatch?.[1]) return [{
|
|
13
|
+
uri: `https://v2.velog.io/rss/${userMatch[1]}`,
|
|
14
|
+
hint: composeHint("velog:posts")
|
|
15
|
+
}];
|
|
16
|
+
if (pathname === "/" || pathname === "") return [{
|
|
17
|
+
uri: "https://v2.velog.io/rss",
|
|
18
|
+
hint: composeHint("velog:trending")
|
|
19
|
+
}];
|
|
20
|
+
return [];
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { velogHandler };
|
|
@@ -4,6 +4,7 @@ const numericRegex = /^\d+$/;
|
|
|
4
4
|
const hosts = ["vimeo.com", "www.vimeo.com"];
|
|
5
5
|
const excludedPaths = [
|
|
6
6
|
"about",
|
|
7
|
+
"album",
|
|
7
8
|
"blog",
|
|
8
9
|
"business",
|
|
9
10
|
"careers",
|
|
@@ -26,6 +27,7 @@ const excludedPaths = [
|
|
|
26
27
|
"pro",
|
|
27
28
|
"search",
|
|
28
29
|
"settings",
|
|
30
|
+
"showcase",
|
|
29
31
|
"site_map",
|
|
30
32
|
"solutions",
|
|
31
33
|
"stock",
|
|
@@ -48,6 +50,10 @@ const vimeoHandler = {
|
|
|
48
50
|
uri: `${origin}/groups/${pathSegments[1]}/videos/rss`,
|
|
49
51
|
hint: require_utils.composeHint("vimeo:group")
|
|
50
52
|
}];
|
|
53
|
+
if ((pathSegments[0] === "album" || pathSegments[0] === "showcase") && pathSegments[1] && numericRegex.test(pathSegments[1])) return [{
|
|
54
|
+
uri: `${origin}/album/${pathSegments[1]}/rss`,
|
|
55
|
+
hint: require_utils.composeHint("vimeo:album")
|
|
56
|
+
}];
|
|
51
57
|
if (pathSegments.length > 0) {
|
|
52
58
|
const user = pathSegments[0];
|
|
53
59
|
if (!require_utils.isAnyOf(user, excludedPaths) && !numericRegex.test(user)) {
|
|
@@ -4,6 +4,7 @@ const numericRegex = /^\d+$/;
|
|
|
4
4
|
const hosts = ["vimeo.com", "www.vimeo.com"];
|
|
5
5
|
const excludedPaths = [
|
|
6
6
|
"about",
|
|
7
|
+
"album",
|
|
7
8
|
"blog",
|
|
8
9
|
"business",
|
|
9
10
|
"careers",
|
|
@@ -26,6 +27,7 @@ const excludedPaths = [
|
|
|
26
27
|
"pro",
|
|
27
28
|
"search",
|
|
28
29
|
"settings",
|
|
30
|
+
"showcase",
|
|
29
31
|
"site_map",
|
|
30
32
|
"solutions",
|
|
31
33
|
"stock",
|
|
@@ -48,6 +50,10 @@ const vimeoHandler = {
|
|
|
48
50
|
uri: `${origin}/groups/${pathSegments[1]}/videos/rss`,
|
|
49
51
|
hint: composeHint("vimeo:group")
|
|
50
52
|
}];
|
|
53
|
+
if ((pathSegments[0] === "album" || pathSegments[0] === "showcase") && pathSegments[1] && numericRegex.test(pathSegments[1])) return [{
|
|
54
|
+
uri: `${origin}/album/${pathSegments[1]}/rss`,
|
|
55
|
+
hint: composeHint("vimeo:album")
|
|
56
|
+
}];
|
|
51
57
|
if (pathSegments.length > 0) {
|
|
52
58
|
const user = pathSegments[0];
|
|
53
59
|
if (!isAnyOf(user, excludedPaths) && !numericRegex.test(user)) {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const require_utils = require("../../../common/utils.cjs");
|
|
2
|
+
//#region src/feeds/platform/handlers/weblogLol.ts
|
|
3
|
+
const weblogLolHandler = {
|
|
4
|
+
match: (url) => {
|
|
5
|
+
return require_utils.isSubdomainOf(url, "weblog.lol");
|
|
6
|
+
},
|
|
7
|
+
resolve: (url) => {
|
|
8
|
+
const { origin } = new URL(url);
|
|
9
|
+
const uris = [];
|
|
10
|
+
uris.push({
|
|
11
|
+
uri: `${origin}/rss.xml`,
|
|
12
|
+
hint: require_utils.composeHint("weblog-lol:posts-rss")
|
|
13
|
+
});
|
|
14
|
+
uris.push({
|
|
15
|
+
uri: `${origin}/atom.xml`,
|
|
16
|
+
hint: require_utils.composeHint("weblog-lol:posts-atom")
|
|
17
|
+
});
|
|
18
|
+
uris.push({
|
|
19
|
+
uri: `${origin}/feed.json`,
|
|
20
|
+
hint: require_utils.composeHint("weblog-lol:posts-json")
|
|
21
|
+
});
|
|
22
|
+
return uris;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
26
|
+
exports.weblogLolHandler = weblogLolHandler;
|