feedscout 1.5.0 → 1.6.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.
Files changed (193) hide show
  1. package/README.md +12 -17
  2. package/dist/blogrolls/defaults.cjs +1 -3
  3. package/dist/blogrolls/defaults.js +1 -2
  4. package/dist/blogrolls/extractors.cjs +6 -9
  5. package/dist/blogrolls/extractors.js +6 -9
  6. package/dist/blogrolls/index.cjs +6 -9
  7. package/dist/blogrolls/index.d.cts +1 -1
  8. package/dist/blogrolls/index.d.ts +1 -1
  9. package/dist/blogrolls/index.js +1 -4
  10. package/dist/blogrolls.cjs +4 -5
  11. package/dist/blogrolls.js +1 -2
  12. package/dist/common/discover/index.cjs +24 -16
  13. package/dist/common/discover/index.js +20 -12
  14. package/dist/common/discover/utils.cjs +19 -9
  15. package/dist/common/discover/utils.js +18 -8
  16. package/dist/common/locales.cjs +59 -15
  17. package/dist/common/locales.js +49 -4
  18. package/dist/common/types.cjs +2 -3
  19. package/dist/common/types.d.cts +11 -6
  20. package/dist/common/types.d.ts +11 -6
  21. package/dist/common/types.js +2 -2
  22. package/dist/common/uris/feed/index.cjs +12 -0
  23. package/dist/common/uris/feed/index.d.cts +6 -0
  24. package/dist/common/uris/feed/index.d.ts +6 -0
  25. package/dist/common/uris/feed/index.js +12 -0
  26. package/dist/common/uris/feed/types.d.cts +9 -0
  27. package/dist/common/uris/feed/types.d.ts +9 -0
  28. package/dist/common/uris/guess/index.cjs +2 -4
  29. package/dist/common/uris/guess/index.js +1 -3
  30. package/dist/common/uris/guess/utils.cjs +1 -3
  31. package/dist/common/uris/guess/utils.js +1 -2
  32. package/dist/common/uris/headers/index.cjs +2 -4
  33. package/dist/common/uris/headers/index.js +1 -3
  34. package/dist/common/uris/html/handlers.cjs +2 -4
  35. package/dist/common/uris/html/handlers.js +1 -3
  36. package/dist/common/uris/html/index.cjs +2 -4
  37. package/dist/common/uris/html/index.js +1 -3
  38. package/dist/common/uris/index.cjs +15 -12
  39. package/dist/common/uris/index.js +8 -5
  40. package/dist/common/uris/platform/index.cjs +3 -5
  41. package/dist/common/uris/platform/index.d.cts +7 -0
  42. package/dist/common/uris/platform/index.d.ts +7 -0
  43. package/dist/common/uris/platform/index.js +3 -4
  44. package/dist/common/uris/platform/types.d.cts +3 -3
  45. package/dist/common/uris/platform/types.d.ts +3 -3
  46. package/dist/common/utils.cjs +20 -9
  47. package/dist/common/utils.d.cts +2 -2
  48. package/dist/common/utils.d.ts +2 -2
  49. package/dist/common/utils.js +18 -8
  50. package/dist/favicons/defaults.cjs +60 -0
  51. package/dist/favicons/defaults.d.cts +18 -0
  52. package/dist/favicons/defaults.d.ts +18 -0
  53. package/dist/favicons/defaults.js +53 -0
  54. package/dist/favicons/extractors.cjs +13 -0
  55. package/dist/favicons/extractors.d.cts +7 -0
  56. package/dist/favicons/extractors.d.ts +7 -0
  57. package/dist/favicons/extractors.js +13 -0
  58. package/dist/favicons/index.cjs +29 -0
  59. package/dist/favicons/index.d.cts +7 -0
  60. package/dist/favicons/index.d.ts +7 -0
  61. package/dist/favicons/index.js +29 -0
  62. package/dist/favicons/platform/handlers/bluesky.cjs +27 -0
  63. package/dist/favicons/platform/handlers/bluesky.js +27 -0
  64. package/dist/favicons/platform/handlers/codeberg.cjs +18 -0
  65. package/dist/favicons/platform/handlers/codeberg.js +18 -0
  66. package/dist/favicons/platform/handlers/deviantart.cjs +29 -0
  67. package/dist/favicons/platform/handlers/deviantart.js +29 -0
  68. package/dist/favicons/platform/handlers/github.cjs +18 -0
  69. package/dist/favicons/platform/handlers/github.js +18 -0
  70. package/dist/favicons/platform/handlers/githubGist.cjs +18 -0
  71. package/dist/favicons/platform/handlers/githubGist.js +18 -0
  72. package/dist/favicons/platform/handlers/lobsters.cjs +21 -0
  73. package/dist/favicons/platform/handlers/lobsters.js +21 -0
  74. package/dist/favicons/platform/handlers/mastodon.cjs +36 -0
  75. package/dist/favicons/platform/handlers/mastodon.js +34 -0
  76. package/dist/favicons/platform/handlers/reddit.cjs +41 -0
  77. package/dist/favicons/platform/handlers/reddit.js +41 -0
  78. package/dist/favicons/platform/handlers/sourceforge.cjs +21 -0
  79. package/dist/favicons/platform/handlers/sourceforge.js +21 -0
  80. package/dist/favicons/platform/handlers/tumblr.cjs +16 -0
  81. package/dist/favicons/platform/handlers/tumblr.js +16 -0
  82. package/dist/favicons/types.d.cts +4 -0
  83. package/dist/favicons/types.d.ts +4 -0
  84. package/dist/favicons.cjs +12 -0
  85. package/dist/favicons.d.cts +4 -0
  86. package/dist/favicons.d.ts +4 -0
  87. package/dist/favicons.js +3 -0
  88. package/dist/feeds/defaults.cjs +55 -25
  89. package/dist/feeds/defaults.js +40 -10
  90. package/dist/feeds/extractors.cjs +1 -3
  91. package/dist/feeds/extractors.js +1 -3
  92. package/dist/feeds/index.cjs +6 -8
  93. package/dist/feeds/index.d.cts +1 -1
  94. package/dist/feeds/index.d.ts +1 -1
  95. package/dist/feeds/index.js +1 -3
  96. package/dist/feeds/platform/handlers/behance.cjs +2 -4
  97. package/dist/feeds/platform/handlers/behance.js +1 -3
  98. package/dist/feeds/platform/handlers/blogspot.cjs +7 -6
  99. package/dist/feeds/platform/handlers/blogspot.js +6 -5
  100. package/dist/feeds/platform/handlers/bluesky.cjs +3 -5
  101. package/dist/feeds/platform/handlers/bluesky.js +2 -4
  102. package/dist/feeds/platform/handlers/codeberg.cjs +69 -0
  103. package/dist/feeds/platform/handlers/codeberg.js +67 -0
  104. package/dist/feeds/platform/handlers/csdn.cjs +19 -0
  105. package/dist/feeds/platform/handlers/csdn.js +19 -0
  106. package/dist/feeds/platform/handlers/dailymotion.cjs +2 -4
  107. package/dist/feeds/platform/handlers/dailymotion.js +1 -3
  108. package/dist/feeds/platform/handlers/deviantart.cjs +4 -4
  109. package/dist/feeds/platform/handlers/deviantart.js +1 -3
  110. package/dist/feeds/platform/handlers/devto.cjs +2 -4
  111. package/dist/feeds/platform/handlers/devto.js +1 -3
  112. package/dist/feeds/platform/handlers/douban.cjs +54 -0
  113. package/dist/feeds/platform/handlers/douban.js +54 -0
  114. package/dist/feeds/platform/handlers/github.cjs +5 -4
  115. package/dist/feeds/platform/handlers/github.js +2 -3
  116. package/dist/feeds/platform/handlers/githubGist.cjs +4 -4
  117. package/dist/feeds/platform/handlers/githubGist.js +1 -3
  118. package/dist/feeds/platform/handlers/gitlab.cjs +2 -4
  119. package/dist/feeds/platform/handlers/gitlab.js +1 -3
  120. package/dist/feeds/platform/handlers/goodreads.cjs +39 -0
  121. package/dist/feeds/platform/handlers/goodreads.js +39 -0
  122. package/dist/feeds/platform/handlers/hashnode.cjs +16 -0
  123. package/dist/feeds/platform/handlers/hashnode.js +16 -0
  124. package/dist/feeds/platform/handlers/hatenablog.cjs +53 -0
  125. package/dist/feeds/platform/handlers/hatenablog.js +53 -0
  126. package/dist/feeds/platform/handlers/itchio.cjs +88 -0
  127. package/dist/feeds/platform/handlers/itchio.js +88 -0
  128. package/dist/feeds/platform/handlers/kickstarter.cjs +2 -4
  129. package/dist/feeds/platform/handlers/kickstarter.js +1 -3
  130. package/dist/feeds/platform/handlers/letterboxd.cjs +42 -0
  131. package/dist/feeds/platform/handlers/letterboxd.js +42 -0
  132. package/dist/feeds/platform/handlers/lobsters.cjs +3 -4
  133. package/dist/feeds/platform/handlers/lobsters.js +1 -3
  134. package/dist/feeds/platform/handlers/mastodon.cjs +40 -0
  135. package/dist/feeds/platform/handlers/mastodon.js +40 -0
  136. package/dist/feeds/platform/handlers/medium.cjs +2 -4
  137. package/dist/feeds/platform/handlers/medium.js +1 -3
  138. package/dist/feeds/platform/handlers/paragraph.cjs +21 -0
  139. package/dist/feeds/platform/handlers/paragraph.js +21 -0
  140. package/dist/feeds/platform/handlers/pinterest.cjs +2 -15
  141. package/dist/feeds/platform/handlers/pinterest.js +1 -14
  142. package/dist/feeds/platform/handlers/producthunt.cjs +2 -4
  143. package/dist/feeds/platform/handlers/producthunt.js +1 -3
  144. package/dist/feeds/platform/handlers/reddit.cjs +3 -4
  145. package/dist/feeds/platform/handlers/reddit.js +1 -3
  146. package/dist/feeds/platform/handlers/soundcloud.cjs +2 -4
  147. package/dist/feeds/platform/handlers/soundcloud.js +1 -3
  148. package/dist/feeds/platform/handlers/sourceforge.cjs +20 -0
  149. package/dist/feeds/platform/handlers/sourceforge.js +19 -0
  150. package/dist/feeds/platform/handlers/stackExchange.cjs +37 -0
  151. package/dist/feeds/platform/handlers/stackExchange.js +37 -0
  152. package/dist/feeds/platform/handlers/steam.cjs +26 -0
  153. package/dist/feeds/platform/handlers/steam.js +26 -0
  154. package/dist/feeds/platform/handlers/substack.cjs +2 -4
  155. package/dist/feeds/platform/handlers/substack.js +1 -3
  156. package/dist/feeds/platform/handlers/tumblr.cjs +5 -5
  157. package/dist/feeds/platform/handlers/tumblr.js +3 -4
  158. package/dist/feeds/platform/handlers/v2ex.cjs +33 -0
  159. package/dist/feeds/platform/handlers/v2ex.js +33 -0
  160. package/dist/feeds/platform/handlers/vimeo.cjs +68 -0
  161. package/dist/feeds/platform/handlers/vimeo.js +68 -0
  162. package/dist/feeds/platform/handlers/wordpress.cjs +5 -7
  163. package/dist/feeds/platform/handlers/wordpress.js +4 -6
  164. package/dist/feeds/platform/handlers/wpengine.cjs +4 -7
  165. package/dist/feeds/platform/handlers/wpengine.js +2 -4
  166. package/dist/feeds/platform/handlers/ximalaya.cjs +19 -0
  167. package/dist/feeds/platform/handlers/ximalaya.js +19 -0
  168. package/dist/feeds/platform/handlers/youtube.cjs +19 -8
  169. package/dist/feeds/platform/handlers/youtube.js +18 -7
  170. package/dist/feeds.cjs +4 -5
  171. package/dist/feeds.js +1 -2
  172. package/dist/hubs/discover/index.cjs +7 -9
  173. package/dist/hubs/discover/index.js +1 -3
  174. package/dist/hubs/discover/utils.cjs +1 -3
  175. package/dist/hubs/discover/utils.js +1 -2
  176. package/dist/hubs/feed/index.cjs +1 -3
  177. package/dist/hubs/feed/index.js +1 -3
  178. package/dist/hubs/headers/index.cjs +3 -5
  179. package/dist/hubs/headers/index.js +1 -3
  180. package/dist/hubs/html/index.cjs +3 -5
  181. package/dist/hubs/html/index.js +1 -3
  182. package/dist/hubs.js +1 -1
  183. package/dist/index.cjs +8 -7
  184. package/dist/index.d.cts +3 -2
  185. package/dist/index.d.ts +3 -2
  186. package/dist/index.js +2 -2
  187. package/dist/methods.cjs +13 -10
  188. package/dist/methods.d.cts +3 -1
  189. package/dist/methods.d.ts +3 -1
  190. package/dist/methods.js +3 -2
  191. package/dist/utils.cjs +3 -4
  192. package/dist/utils.js +1 -2
  193. package/package.json +15 -5
@@ -1,5 +1,4 @@
1
- const require_utils = require('../../../common/utils.cjs');
2
-
1
+ const require_utils = require("../../../common/utils.cjs");
3
2
  //#region src/feeds/platform/handlers/behance.ts
4
3
  const hosts = ["behance.net", "www.behance.net"];
5
4
  const userPathRegex = /^\/([a-zA-Z0-9_-]+)(?:\/(appreciated))?\/?$/;
@@ -46,6 +45,5 @@ const behanceHandler = {
46
45
  return [];
47
46
  }
48
47
  };
49
-
50
48
  //#endregion
51
- exports.behanceHandler = behanceHandler;
49
+ exports.behanceHandler = behanceHandler;
@@ -1,5 +1,4 @@
1
1
  import { composeHint, isAnyOf, isHostOf } from "../../../common/utils.js";
2
-
3
2
  //#region src/feeds/platform/handlers/behance.ts
4
3
  const hosts = ["behance.net", "www.behance.net"];
5
4
  const userPathRegex = /^\/([a-zA-Z0-9_-]+)(?:\/(appreciated))?\/?$/;
@@ -46,6 +45,5 @@ const behanceHandler = {
46
45
  return [];
47
46
  }
48
47
  };
49
-
50
48
  //#endregion
51
- export { behanceHandler };
49
+ export { behanceHandler };
@@ -1,11 +1,13 @@
1
- const require_utils = require('../../../common/utils.cjs');
2
-
1
+ const require_utils = require("../../../common/utils.cjs");
3
2
  //#region src/feeds/platform/handlers/blogspot.ts
4
3
  const blogspotDomainRegex = /^.+\.blogspot\.(?:com|co\.[a-z]{2}|com\.[a-z]{2}|[a-z]{2,3})$/;
5
4
  const blogspotHandler = {
6
5
  match: (url) => {
7
- const hostname = new URL(url).hostname.toLowerCase();
8
- return blogspotDomainRegex.test(hostname);
6
+ try {
7
+ const hostname = new URL(url).hostname.toLowerCase();
8
+ return blogspotDomainRegex.test(hostname);
9
+ } catch {}
10
+ return false;
9
11
  },
10
12
  resolve: (url) => {
11
13
  const { origin, pathname } = new URL(url);
@@ -29,6 +31,5 @@ const blogspotHandler = {
29
31
  return uris;
30
32
  }
31
33
  };
32
-
33
34
  //#endregion
34
- exports.blogspotHandler = blogspotHandler;
35
+ exports.blogspotHandler = blogspotHandler;
@@ -1,11 +1,13 @@
1
1
  import { composeHint } from "../../../common/utils.js";
2
-
3
2
  //#region src/feeds/platform/handlers/blogspot.ts
4
3
  const blogspotDomainRegex = /^.+\.blogspot\.(?:com|co\.[a-z]{2}|com\.[a-z]{2}|[a-z]{2,3})$/;
5
4
  const blogspotHandler = {
6
5
  match: (url) => {
7
- const hostname = new URL(url).hostname.toLowerCase();
8
- return blogspotDomainRegex.test(hostname);
6
+ try {
7
+ const hostname = new URL(url).hostname.toLowerCase();
8
+ return blogspotDomainRegex.test(hostname);
9
+ } catch {}
10
+ return false;
9
11
  },
10
12
  resolve: (url) => {
11
13
  const { origin, pathname } = new URL(url);
@@ -29,6 +31,5 @@ const blogspotHandler = {
29
31
  return uris;
30
32
  }
31
33
  };
32
-
33
34
  //#endregion
34
- export { blogspotHandler };
35
+ export { blogspotHandler };
@@ -1,7 +1,6 @@
1
- const require_utils = require('../../../common/utils.cjs');
2
-
1
+ const require_utils = require("../../../common/utils.cjs");
3
2
  //#region src/feeds/platform/handlers/bluesky.ts
4
- const hosts = ["bsky.app"];
3
+ const hosts = ["bsky.app", "www.bsky.app"];
5
4
  const blueskyHandler = {
6
5
  match: (url) => {
7
6
  return require_utils.isHostOf(url, hosts);
@@ -16,6 +15,5 @@ const blueskyHandler = {
16
15
  }];
17
16
  }
18
17
  };
19
-
20
18
  //#endregion
21
- exports.blueskyHandler = blueskyHandler;
19
+ exports.blueskyHandler = blueskyHandler;
@@ -1,7 +1,6 @@
1
1
  import { composeHint, isHostOf } from "../../../common/utils.js";
2
-
3
2
  //#region src/feeds/platform/handlers/bluesky.ts
4
- const hosts = ["bsky.app"];
3
+ const hosts = ["bsky.app", "www.bsky.app"];
5
4
  const blueskyHandler = {
6
5
  match: (url) => {
7
6
  return isHostOf(url, hosts);
@@ -16,6 +15,5 @@ const blueskyHandler = {
16
15
  }];
17
16
  }
18
17
  };
19
-
20
18
  //#endregion
21
- export { blueskyHandler };
19
+ export { blueskyHandler };
@@ -0,0 +1,69 @@
1
+ const require_utils = require("../../../common/utils.cjs");
2
+ //#region src/feeds/platform/handlers/codeberg.ts
3
+ const hosts = [
4
+ "codeberg.org",
5
+ "www.codeberg.org",
6
+ "gitea.com",
7
+ "www.gitea.com"
8
+ ];
9
+ const excludedPaths = [
10
+ "explore",
11
+ "admin",
12
+ "user",
13
+ "assets",
14
+ "api",
15
+ "swagger.json",
16
+ "robots.txt",
17
+ "sitemap.xml",
18
+ "-"
19
+ ];
20
+ const codebergHandler = {
21
+ match: (url) => {
22
+ return require_utils.isHostOf(url, hosts);
23
+ },
24
+ resolve: (url) => {
25
+ const { origin, pathname } = new URL(url);
26
+ const pathSegments = pathname.split("/").filter(Boolean);
27
+ if (pathSegments.length === 1) {
28
+ const user = pathSegments[0];
29
+ if (!require_utils.isAnyOf(user, excludedPaths)) return [{
30
+ uri: `${origin}/${user}.rss`,
31
+ hint: require_utils.composeHint("codeberg:activity")
32
+ }];
33
+ }
34
+ if (pathSegments.length >= 2) {
35
+ const user = pathSegments[0];
36
+ const repo = pathSegments[1];
37
+ if (!require_utils.isAnyOf(user, excludedPaths)) {
38
+ const feeds = [
39
+ {
40
+ uri: `${origin}/${user}/${repo}/releases.rss`,
41
+ hint: require_utils.composeHint("codeberg:releases")
42
+ },
43
+ {
44
+ uri: `${origin}/${user}/${repo}/tags.rss`,
45
+ hint: require_utils.composeHint("codeberg:tags")
46
+ },
47
+ {
48
+ uri: `${origin}/${user}/${repo}.rss`,
49
+ hint: require_utils.composeHint("codeberg:activity")
50
+ }
51
+ ];
52
+ if (pathSegments[2] === "src" && pathSegments[3] === "branch" && pathSegments[4]) {
53
+ const branch = pathSegments[4];
54
+ const filePath = pathSegments.slice(5).join("/");
55
+ feeds.unshift({
56
+ uri: `${origin}/${user}/${repo}/rss/branch/${branch}${filePath ? `/${filePath}` : ""}`,
57
+ hint: require_utils.composeHint(filePath ? "codeberg:file-history" : "codeberg:branch-commits")
58
+ });
59
+ }
60
+ return feeds;
61
+ }
62
+ }
63
+ return [];
64
+ }
65
+ };
66
+ //#endregion
67
+ exports.codebergHandler = codebergHandler;
68
+ exports.excludedPaths = excludedPaths;
69
+ exports.hosts = hosts;
@@ -0,0 +1,67 @@
1
+ import { composeHint, isAnyOf, isHostOf } from "../../../common/utils.js";
2
+ //#region src/feeds/platform/handlers/codeberg.ts
3
+ const hosts = [
4
+ "codeberg.org",
5
+ "www.codeberg.org",
6
+ "gitea.com",
7
+ "www.gitea.com"
8
+ ];
9
+ const excludedPaths = [
10
+ "explore",
11
+ "admin",
12
+ "user",
13
+ "assets",
14
+ "api",
15
+ "swagger.json",
16
+ "robots.txt",
17
+ "sitemap.xml",
18
+ "-"
19
+ ];
20
+ const codebergHandler = {
21
+ match: (url) => {
22
+ return isHostOf(url, hosts);
23
+ },
24
+ resolve: (url) => {
25
+ const { origin, pathname } = new URL(url);
26
+ const pathSegments = pathname.split("/").filter(Boolean);
27
+ if (pathSegments.length === 1) {
28
+ const user = pathSegments[0];
29
+ if (!isAnyOf(user, excludedPaths)) return [{
30
+ uri: `${origin}/${user}.rss`,
31
+ hint: composeHint("codeberg:activity")
32
+ }];
33
+ }
34
+ if (pathSegments.length >= 2) {
35
+ const user = pathSegments[0];
36
+ const repo = pathSegments[1];
37
+ if (!isAnyOf(user, excludedPaths)) {
38
+ const feeds = [
39
+ {
40
+ uri: `${origin}/${user}/${repo}/releases.rss`,
41
+ hint: composeHint("codeberg:releases")
42
+ },
43
+ {
44
+ uri: `${origin}/${user}/${repo}/tags.rss`,
45
+ hint: composeHint("codeberg:tags")
46
+ },
47
+ {
48
+ uri: `${origin}/${user}/${repo}.rss`,
49
+ hint: composeHint("codeberg:activity")
50
+ }
51
+ ];
52
+ if (pathSegments[2] === "src" && pathSegments[3] === "branch" && pathSegments[4]) {
53
+ const branch = pathSegments[4];
54
+ const filePath = pathSegments.slice(5).join("/");
55
+ feeds.unshift({
56
+ uri: `${origin}/${user}/${repo}/rss/branch/${branch}${filePath ? `/${filePath}` : ""}`,
57
+ hint: composeHint(filePath ? "codeberg:file-history" : "codeberg:branch-commits")
58
+ });
59
+ }
60
+ return feeds;
61
+ }
62
+ }
63
+ return [];
64
+ }
65
+ };
66
+ //#endregion
67
+ export { codebergHandler, excludedPaths, hosts };
@@ -0,0 +1,19 @@
1
+ const require_utils = require("../../../common/utils.cjs");
2
+ //#region src/feeds/platform/handlers/csdn.ts
3
+ const hosts = ["blog.csdn.net"];
4
+ const csdnHandler = {
5
+ match: (url) => {
6
+ return require_utils.isHostOf(url, hosts);
7
+ },
8
+ resolve: (url) => {
9
+ const { pathname } = new URL(url);
10
+ const username = pathname.match(/^\/([^/]+)/)?.[1];
11
+ if (!username) return [];
12
+ return [{
13
+ uri: [`https://rss.csdn.net/${username}/rss/map`, `https://blog.csdn.net/${username}/rss/list`],
14
+ hint: require_utils.composeHint("csdn:blog")
15
+ }];
16
+ }
17
+ };
18
+ //#endregion
19
+ exports.csdnHandler = csdnHandler;
@@ -0,0 +1,19 @@
1
+ import { composeHint, isHostOf } from "../../../common/utils.js";
2
+ //#region src/feeds/platform/handlers/csdn.ts
3
+ const hosts = ["blog.csdn.net"];
4
+ const csdnHandler = {
5
+ match: (url) => {
6
+ return isHostOf(url, hosts);
7
+ },
8
+ resolve: (url) => {
9
+ const { pathname } = new URL(url);
10
+ const username = pathname.match(/^\/([^/]+)/)?.[1];
11
+ if (!username) return [];
12
+ return [{
13
+ uri: [`https://rss.csdn.net/${username}/rss/map`, `https://blog.csdn.net/${username}/rss/list`],
14
+ hint: composeHint("csdn:blog")
15
+ }];
16
+ }
17
+ };
18
+ //#endregion
19
+ export { csdnHandler };
@@ -1,5 +1,4 @@
1
- const require_utils = require('../../../common/utils.cjs');
2
-
1
+ const require_utils = require("../../../common/utils.cjs");
3
2
  //#region src/feeds/platform/handlers/dailymotion.ts
4
3
  const hosts = ["dailymotion.com", "www.dailymotion.com"];
5
4
  const userPathRegex = /^\/([a-zA-Z0-9_-]+)$/;
@@ -67,6 +66,5 @@ const dailymotionHandler = {
67
66
  return [];
68
67
  }
69
68
  };
70
-
71
69
  //#endregion
72
- exports.dailymotionHandler = dailymotionHandler;
70
+ exports.dailymotionHandler = dailymotionHandler;
@@ -1,5 +1,4 @@
1
1
  import { composeHint, isAnyOf, isHostOf } from "../../../common/utils.js";
2
-
3
2
  //#region src/feeds/platform/handlers/dailymotion.ts
4
3
  const hosts = ["dailymotion.com", "www.dailymotion.com"];
5
4
  const userPathRegex = /^\/([a-zA-Z0-9_-]+)$/;
@@ -67,6 +66,5 @@ const dailymotionHandler = {
67
66
  return [];
68
67
  }
69
68
  };
70
-
71
69
  //#endregion
72
- export { dailymotionHandler };
70
+ export { dailymotionHandler };
@@ -1,5 +1,4 @@
1
- const require_utils = require('../../../common/utils.cjs');
2
-
1
+ const require_utils = require("../../../common/utils.cjs");
3
2
  //#region src/feeds/platform/handlers/deviantart.ts
4
3
  const hosts = ["deviantart.com", "www.deviantart.com"];
5
4
  const feedBaseUrl = "https://backend.deviantart.com/rss.xml";
@@ -57,6 +56,7 @@ const deviantartHandler = {
57
56
  }];
58
57
  }
59
58
  };
60
-
61
59
  //#endregion
62
- exports.deviantartHandler = deviantartHandler;
60
+ exports.deviantartHandler = deviantartHandler;
61
+ exports.excludedPaths = excludedPaths;
62
+ exports.hosts = hosts;
@@ -1,5 +1,4 @@
1
1
  import { composeHint, isAnyOf, isHostOf } from "../../../common/utils.js";
2
-
3
2
  //#region src/feeds/platform/handlers/deviantart.ts
4
3
  const hosts = ["deviantart.com", "www.deviantart.com"];
5
4
  const feedBaseUrl = "https://backend.deviantart.com/rss.xml";
@@ -57,6 +56,5 @@ const deviantartHandler = {
57
56
  }];
58
57
  }
59
58
  };
60
-
61
59
  //#endregion
62
- export { deviantartHandler };
60
+ export { deviantartHandler, excludedPaths, hosts };
@@ -1,5 +1,4 @@
1
- const require_utils = require('../../../common/utils.cjs');
2
-
1
+ const require_utils = require("../../../common/utils.cjs");
3
2
  //#region src/feeds/platform/handlers/devto.ts
4
3
  const hosts = ["dev.to", "www.dev.to"];
5
4
  const userPathRegex = /^\/([a-zA-Z0-9_]+)\/?$/;
@@ -45,6 +44,5 @@ const devtoHandler = {
45
44
  return [];
46
45
  }
47
46
  };
48
-
49
47
  //#endregion
50
- exports.devtoHandler = devtoHandler;
48
+ exports.devtoHandler = devtoHandler;
@@ -1,5 +1,4 @@
1
1
  import { composeHint, isAnyOf, isHostOf } from "../../../common/utils.js";
2
-
3
2
  //#region src/feeds/platform/handlers/devto.ts
4
3
  const hosts = ["dev.to", "www.dev.to"];
5
4
  const userPathRegex = /^\/([a-zA-Z0-9_]+)\/?$/;
@@ -45,6 +44,5 @@ const devtoHandler = {
45
44
  return [];
46
45
  }
47
46
  };
48
-
49
47
  //#endregion
50
- export { devtoHandler };
48
+ export { devtoHandler };
@@ -0,0 +1,54 @@
1
+ const require_utils = require("../../../common/utils.cjs");
2
+ //#region src/feeds/platform/handlers/douban.ts
3
+ const doubanHandler = {
4
+ match: (url) => {
5
+ return require_utils.isHostOf(url, "douban.com") || require_utils.isSubdomainOf(url, "douban.com");
6
+ },
7
+ resolve: (url) => {
8
+ const { pathname } = new URL(url);
9
+ const userMatch = pathname.match(/^\/people\/([^/]+)/);
10
+ if (userMatch?.[1]) {
11
+ const user = userMatch[1];
12
+ return [
13
+ {
14
+ uri: `https://www.douban.com/feed/people/${user}/interests`,
15
+ hint: require_utils.composeHint("douban:interests")
16
+ },
17
+ {
18
+ uri: `https://www.douban.com/feed/people/${user}/reviews`,
19
+ hint: require_utils.composeHint("douban:reviews")
20
+ },
21
+ {
22
+ uri: `https://www.douban.com/feed/people/${user}/notes`,
23
+ hint: require_utils.composeHint("douban:notes")
24
+ }
25
+ ];
26
+ }
27
+ const subjectMatch = pathname.match(/^\/subject\/(\d+)/);
28
+ if (subjectMatch?.[1]) return [{
29
+ uri: `https://www.douban.com/feed/subject/${subjectMatch[1]}/reviews`,
30
+ hint: require_utils.composeHint("douban:subjectReviews")
31
+ }];
32
+ if (pathname === "/" || pathname === "") return [
33
+ {
34
+ uri: "https://www.douban.com/feed/review/book",
35
+ hint: require_utils.composeHint("douban:reviews")
36
+ },
37
+ {
38
+ uri: "https://www.douban.com/feed/review/movie",
39
+ hint: require_utils.composeHint("douban:reviews")
40
+ },
41
+ {
42
+ uri: "https://www.douban.com/feed/review/music",
43
+ hint: require_utils.composeHint("douban:reviews")
44
+ },
45
+ {
46
+ uri: "https://www.douban.com/feed/review/drama",
47
+ hint: require_utils.composeHint("douban:reviews")
48
+ }
49
+ ];
50
+ return [];
51
+ }
52
+ };
53
+ //#endregion
54
+ exports.doubanHandler = doubanHandler;
@@ -0,0 +1,54 @@
1
+ import { composeHint, isHostOf, isSubdomainOf } from "../../../common/utils.js";
2
+ //#region src/feeds/platform/handlers/douban.ts
3
+ const doubanHandler = {
4
+ match: (url) => {
5
+ return isHostOf(url, "douban.com") || isSubdomainOf(url, "douban.com");
6
+ },
7
+ resolve: (url) => {
8
+ const { pathname } = new URL(url);
9
+ const userMatch = pathname.match(/^\/people\/([^/]+)/);
10
+ if (userMatch?.[1]) {
11
+ const user = userMatch[1];
12
+ return [
13
+ {
14
+ uri: `https://www.douban.com/feed/people/${user}/interests`,
15
+ hint: composeHint("douban:interests")
16
+ },
17
+ {
18
+ uri: `https://www.douban.com/feed/people/${user}/reviews`,
19
+ hint: composeHint("douban:reviews")
20
+ },
21
+ {
22
+ uri: `https://www.douban.com/feed/people/${user}/notes`,
23
+ hint: composeHint("douban:notes")
24
+ }
25
+ ];
26
+ }
27
+ const subjectMatch = pathname.match(/^\/subject\/(\d+)/);
28
+ if (subjectMatch?.[1]) return [{
29
+ uri: `https://www.douban.com/feed/subject/${subjectMatch[1]}/reviews`,
30
+ hint: composeHint("douban:subjectReviews")
31
+ }];
32
+ if (pathname === "/" || pathname === "") return [
33
+ {
34
+ uri: "https://www.douban.com/feed/review/book",
35
+ hint: composeHint("douban:reviews")
36
+ },
37
+ {
38
+ uri: "https://www.douban.com/feed/review/movie",
39
+ hint: composeHint("douban:reviews")
40
+ },
41
+ {
42
+ uri: "https://www.douban.com/feed/review/music",
43
+ hint: composeHint("douban:reviews")
44
+ },
45
+ {
46
+ uri: "https://www.douban.com/feed/review/drama",
47
+ hint: composeHint("douban:reviews")
48
+ }
49
+ ];
50
+ return [];
51
+ }
52
+ };
53
+ //#endregion
54
+ export { doubanHandler };
@@ -1,5 +1,4 @@
1
- const require_utils = require('../../../common/utils.cjs');
2
-
1
+ const require_utils = require("../../../common/utils.cjs");
3
2
  //#region src/feeds/platform/handlers/github.ts
4
3
  const hosts = ["github.com", "www.github.com"];
5
4
  const excludedPaths = [
@@ -40,6 +39,7 @@ const excludedPaths = [
40
39
  "security",
41
40
  "sessions",
42
41
  "settings",
42
+ "signup",
43
43
  "site",
44
44
  "sponsors",
45
45
  "stars",
@@ -104,6 +104,7 @@ const githubHandler = {
104
104
  return uris;
105
105
  }
106
106
  };
107
-
108
107
  //#endregion
109
- exports.githubHandler = githubHandler;
108
+ exports.excludedPaths = excludedPaths;
109
+ exports.githubHandler = githubHandler;
110
+ exports.hosts = hosts;
@@ -1,5 +1,4 @@
1
1
  import { composeHint, isAnyOf, isHostOf } from "../../../common/utils.js";
2
-
3
2
  //#region src/feeds/platform/handlers/github.ts
4
3
  const hosts = ["github.com", "www.github.com"];
5
4
  const excludedPaths = [
@@ -40,6 +39,7 @@ const excludedPaths = [
40
39
  "security",
41
40
  "sessions",
42
41
  "settings",
42
+ "signup",
43
43
  "site",
44
44
  "sponsors",
45
45
  "stars",
@@ -104,6 +104,5 @@ const githubHandler = {
104
104
  return uris;
105
105
  }
106
106
  };
107
-
108
107
  //#endregion
109
- export { githubHandler };
108
+ export { excludedPaths, githubHandler, hosts };
@@ -1,5 +1,4 @@
1
- const require_utils = require('../../../common/utils.cjs');
2
-
1
+ const require_utils = require("../../../common/utils.cjs");
3
2
  //#region src/feeds/platform/handlers/githubGist.ts
4
3
  const hosts = ["gist.github.com"];
5
4
  const excludedPaths = [
@@ -37,6 +36,7 @@ const githubGistHandler = {
37
36
  return [];
38
37
  }
39
38
  };
40
-
41
39
  //#endregion
42
- exports.githubGistHandler = githubGistHandler;
40
+ exports.excludedPaths = excludedPaths;
41
+ exports.githubGistHandler = githubGistHandler;
42
+ exports.hosts = hosts;
@@ -1,5 +1,4 @@
1
1
  import { composeHint, isAnyOf, isHostOf } from "../../../common/utils.js";
2
-
3
2
  //#region src/feeds/platform/handlers/githubGist.ts
4
3
  const hosts = ["gist.github.com"];
5
4
  const excludedPaths = [
@@ -37,6 +36,5 @@ const githubGistHandler = {
37
36
  return [];
38
37
  }
39
38
  };
40
-
41
39
  //#endregion
42
- export { githubGistHandler };
40
+ export { excludedPaths, githubGistHandler, hosts };
@@ -1,5 +1,4 @@
1
- const require_utils = require('../../../common/utils.cjs');
2
-
1
+ const require_utils = require("../../../common/utils.cjs");
3
2
  //#region src/feeds/platform/handlers/gitlab.ts
4
3
  const hosts = ["gitlab.com", "www.gitlab.com"];
5
4
  const excludedPaths = [
@@ -60,6 +59,5 @@ const gitlabHandler = {
60
59
  return [];
61
60
  }
62
61
  };
63
-
64
62
  //#endregion
65
- exports.gitlabHandler = gitlabHandler;
63
+ exports.gitlabHandler = gitlabHandler;
@@ -1,5 +1,4 @@
1
1
  import { composeHint, isAnyOf, isHostOf } from "../../../common/utils.js";
2
-
3
2
  //#region src/feeds/platform/handlers/gitlab.ts
4
3
  const hosts = ["gitlab.com", "www.gitlab.com"];
5
4
  const excludedPaths = [
@@ -60,6 +59,5 @@ const gitlabHandler = {
60
59
  return [];
61
60
  }
62
61
  };
63
-
64
62
  //#endregion
65
- export { gitlabHandler };
63
+ export { gitlabHandler };
@@ -0,0 +1,39 @@
1
+ const require_utils = require("../../../common/utils.cjs");
2
+ //#region src/feeds/platform/handlers/goodreads.ts
3
+ const hosts = ["goodreads.com", "www.goodreads.com"];
4
+ const parseUserId = (segment) => {
5
+ const id = Number.parseInt(segment, 10);
6
+ return Number.isNaN(id) ? void 0 : id;
7
+ };
8
+ const goodreadsHandler = {
9
+ match: (url) => {
10
+ return require_utils.isHostOf(url, hosts);
11
+ },
12
+ resolve: (url) => {
13
+ const { origin, pathname } = new URL(url);
14
+ const pathSegments = pathname.split("/").filter(Boolean);
15
+ if (pathSegments[0] === "user" && pathSegments[1] === "show" && pathSegments[2]) {
16
+ const userId = parseUserId(pathSegments[2]);
17
+ if (userId) return [{
18
+ uri: `${origin}/user/updates_rss/${userId}`,
19
+ hint: require_utils.composeHint("goodreads:updates")
20
+ }, {
21
+ uri: `${origin}/review/list_rss/${userId}`,
22
+ hint: require_utils.composeHint("goodreads:reviews")
23
+ }];
24
+ }
25
+ if (pathSegments[0] === "review" && pathSegments[1] === "list" && pathSegments[2]) {
26
+ const userId = parseUserId(pathSegments[2]);
27
+ if (userId) return [{
28
+ uri: `${origin}/review/list_rss/${userId}`,
29
+ hint: require_utils.composeHint("goodreads:reviews")
30
+ }, {
31
+ uri: `${origin}/user/updates_rss/${userId}`,
32
+ hint: require_utils.composeHint("goodreads:updates")
33
+ }];
34
+ }
35
+ return [];
36
+ }
37
+ };
38
+ //#endregion
39
+ exports.goodreadsHandler = goodreadsHandler;