rsshub 1.0.0-master.f72af1b → 1.0.0-master.f7347d9

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 (222) hide show
  1. package/lib/config.ts +18 -0
  2. package/lib/middleware/template.tsx +10 -2
  3. package/lib/routes/163/music/playlist.ts +2 -1
  4. package/lib/routes/5eplay/index.ts +1 -51
  5. package/lib/routes/a9vg/index.ts +214 -0
  6. package/lib/routes/a9vg/namespace.ts +1 -0
  7. package/lib/routes/a9vg/templates/description.art +17 -0
  8. package/lib/routes/aibase/discover.ts +388 -0
  9. package/lib/routes/aibase/namespace.ts +8 -0
  10. package/lib/routes/aibase/news.ts +118 -0
  11. package/lib/routes/aibase/templates/description.art +100 -0
  12. package/lib/routes/aibase/topic.ts +614 -0
  13. package/lib/routes/aibase/util.ts +114 -0
  14. package/lib/routes/apnews/api.ts +18 -3
  15. package/lib/routes/apnews/rss.ts +1 -1
  16. package/lib/routes/apnews/topics.ts +4 -3
  17. package/lib/routes/apple/podcast.ts +19 -15
  18. package/lib/routes/bangumi/templates/tv/subject.art +6 -0
  19. package/lib/routes/bangumi/tv/other/followrank.ts +19 -22
  20. package/lib/routes/bangumi/tv/user/collections.ts +172 -0
  21. package/lib/routes/bilibili/cache.ts +16 -8
  22. package/lib/routes/bilibili/utils.ts +85 -3
  23. package/lib/routes/bilibili/video.ts +7 -9
  24. package/lib/routes/bilibili/vsearch.ts +1 -1
  25. package/lib/routes/bjnews/cat.ts +9 -1
  26. package/lib/routes/cbpanet/index.ts +380 -0
  27. package/lib/routes/cbpanet/namespace.ts +8 -0
  28. package/lib/routes/ceph/blog.ts +72 -0
  29. package/lib/routes/ceph/namespace.ts +7 -0
  30. package/lib/routes/chinanews/index.ts +1 -1
  31. package/lib/routes/chinaventure/index.ts +1 -1
  32. package/lib/routes/cisia/index.ts +264 -0
  33. package/lib/routes/cisia/namespace.ts +8 -0
  34. package/lib/routes/cjlu/namespace.ts +10 -0
  35. package/lib/routes/cjlu/yjsy/index.ts +107 -0
  36. package/lib/routes/cnki/journals.ts +31 -2
  37. package/lib/routes/cohere/index.ts +54 -0
  38. package/lib/routes/cohere/namespace.ts +6 -0
  39. package/lib/routes/coolapk/dyh.ts +7 -1
  40. package/lib/routes/coolapk/hot.ts +7 -1
  41. package/lib/routes/coolapk/huati.ts +7 -1
  42. package/lib/routes/coolapk/namespace.ts +6 -0
  43. package/lib/routes/coolapk/toutiao.ts +7 -1
  44. package/lib/routes/coolapk/tuwen.ts +10 -5
  45. package/lib/routes/coolapk/user-dynamic.ts +7 -1
  46. package/lib/routes/damai/activity.ts +3 -2
  47. package/lib/routes/dcfever/trading.ts +3 -5
  48. package/lib/routes/dcfever/utils.ts +13 -4
  49. package/lib/routes/dealstreetasia/home.ts +72 -0
  50. package/lib/routes/dealstreetasia/namespace.ts +6 -0
  51. package/lib/routes/dealstreetasia/section.ts +57 -0
  52. package/lib/routes/dlsite/campaign.ts +1 -2
  53. package/lib/routes/dlsite/new.ts +1 -2
  54. package/lib/routes/dlsite/{index.ts → z-index/index.ts} +1 -1
  55. package/lib/routes/douban/other/topic.ts +10 -4
  56. package/lib/routes/douyin/types.ts +795 -0
  57. package/lib/routes/douyin/user.ts +51 -23
  58. package/lib/routes/douyin/utils.ts +1 -87
  59. package/lib/routes/dribbble/keyword.ts +1 -1
  60. package/lib/routes/dribbble/popular.ts +1 -1
  61. package/lib/routes/dribbble/user.ts +1 -1
  62. package/lib/routes/dribbble/utils.ts +16 -18
  63. package/lib/routes/famitsu/category.ts +1 -1
  64. package/lib/routes/fanbox/index.ts +1 -1
  65. package/lib/routes/fanbox/types.ts +1 -5
  66. package/lib/routes/fediverse/timeline.ts +21 -3
  67. package/lib/routes/follow/profile.ts +4 -2
  68. package/lib/routes/follow/types.ts +11 -1
  69. package/lib/routes/github/advisor.ts +97 -0
  70. package/lib/routes/github/discussions.ts +194 -0
  71. package/lib/routes/github/issue.ts +1 -1
  72. package/lib/routes/github/pulls.ts +1 -1
  73. package/lib/routes/gmcmonline/chinacustoms.ts +130 -0
  74. package/lib/routes/gmcmonline/namespace.ts +8 -0
  75. package/lib/routes/gov/csrc/csrc.ts +541 -0
  76. package/lib/routes/gov/customs/list.ts +5 -2
  77. package/lib/routes/gov/customs/namespace.ts +7 -0
  78. package/lib/routes/gov/jgjcndrc/index.ts +95 -66
  79. package/lib/routes/gov/moa/moa.ts +3 -3
  80. package/lib/routes/gov/moa/szcpxx.ts +115 -0
  81. package/lib/routes/gov/moa/zdscxx.ts +71 -21
  82. package/lib/routes/gov/ndrc/zfxxgk.ts +106 -0
  83. package/lib/routes/gov/pudong/zwgk.ts +65 -0
  84. package/lib/routes/gov/zj/search.ts +17 -12
  85. package/lib/routes/guancha/member.ts +1 -1
  86. package/lib/routes/hellogithub/index.ts +17 -67
  87. package/lib/routes/hellogithub/report.ts +1 -1
  88. package/lib/routes/hex-rays/index.ts +23 -29
  89. package/lib/routes/hfut/hf/notice.ts +43 -0
  90. package/lib/routes/hfut/hf/utils.ts +80 -0
  91. package/lib/routes/hfut/namespace.ts +6 -0
  92. package/lib/routes/hfut/xc/notice.ts +43 -0
  93. package/lib/routes/hfut/xc/utils.ts +73 -0
  94. package/lib/routes/hko/earthquake.ts +56 -0
  95. package/lib/routes/hko/namespace.ts +8 -0
  96. package/lib/routes/hko/weather.ts +56 -0
  97. package/lib/routes/huggingface/blog-zh.ts +1 -1
  98. package/lib/routes/hust/mse.ts +575 -0
  99. package/lib/routes/i-cable/namespace.ts +6 -0
  100. package/lib/routes/i-cable/news.ts +77 -0
  101. package/lib/routes/i-cable/templates/description.art +8 -0
  102. package/lib/routes/infoq/presentations.ts +203 -0
  103. package/lib/routes/infoq/templates/description.art +41 -0
  104. package/lib/routes/ipsw.dev/index.ts +64 -0
  105. package/lib/routes/ipsw.dev/namespace.ts +7 -0
  106. package/lib/routes/ipsw.dev/templates/description.art +20 -0
  107. package/lib/routes/ixigua/user-video.ts +18 -7
  108. package/lib/routes/javtiful/actress.ts +37 -0
  109. package/lib/routes/javtiful/channel.ts +37 -0
  110. package/lib/routes/javtiful/namespace.ts +6 -0
  111. package/lib/routes/javtiful/templates/description.art +7 -0
  112. package/lib/routes/javtiful/utils.ts +18 -0
  113. package/lib/routes/kisskiss/blog.ts +74 -0
  114. package/lib/routes/kisskiss/namespace.ts +6 -0
  115. package/lib/routes/ktown4u/artist-brandlist.ts +61 -0
  116. package/lib/routes/ktown4u/namespace.ts +6 -0
  117. package/lib/routes/lorientlejour/index.ts +186 -0
  118. package/lib/routes/lorientlejour/namespace.ts +7 -0
  119. package/lib/routes/lorientlejour/templates/description.art +18 -0
  120. package/lib/routes/lovelive-anime/namespace.ts +1 -1
  121. package/lib/routes/lovelive-anime/news.ts +56 -26
  122. package/lib/routes/lovelive-anime/schedules.ts +18 -6
  123. package/lib/routes/lovelive-anime/templates/description.art +1 -1
  124. package/lib/routes/lovelive-anime/templates/scheduleDesc.art +0 -1
  125. package/lib/routes/lovelive-anime/topics.ts +1 -1
  126. package/lib/routes/manhuagui/comic.ts +1 -1
  127. package/lib/routes/mi/crowdfunding.ts +43 -22
  128. package/lib/routes/mi/templates/crowdfunding.art +28 -0
  129. package/lib/routes/mi/types.ts +40 -0
  130. package/lib/routes/mi/utils.ts +80 -0
  131. package/lib/routes/misskey/utils.ts +1 -0
  132. package/lib/routes/misskon/namespace.ts +6 -0
  133. package/lib/routes/misskon/posts.ts +33 -0
  134. package/lib/routes/misskon/tag.ts +38 -0
  135. package/lib/routes/misskon/top.ts +67 -0
  136. package/lib/routes/misskon/utils.ts +41 -0
  137. package/lib/routes/natgeo/dailyphoto.ts +1 -1
  138. package/lib/routes/natgeo/dailyselection.ts +1 -1
  139. package/lib/routes/ncku/namespace.ts +1 -1
  140. package/lib/routes/ncku/phys.ts +95 -0
  141. package/lib/routes/news/namespace.ts +1 -1
  142. package/lib/routes/nikkei/cn/index.ts +12 -1
  143. package/lib/routes/nudt/yjszs.ts +33 -13
  144. package/lib/routes/nytimes/book.ts +11 -11
  145. package/lib/routes/nytimes/daily-briefing-chinese.ts +4 -4
  146. package/lib/routes/nytimes/namespace.ts +1 -1
  147. package/lib/routes/oncc/templates/article.art +1 -1
  148. package/lib/routes/papers/index.ts +7 -1
  149. package/lib/routes/parliament.uk/commonslibrary.ts +55 -0
  150. package/lib/routes/parliament.uk/lordslibrary.ts +55 -0
  151. package/lib/routes/parliament.uk/namespace.ts +6 -0
  152. package/lib/routes/picuki/profile.ts +50 -39
  153. package/lib/routes/pornhub/model.ts +3 -5
  154. package/lib/routes/pornhub/pornstar.ts +3 -5
  155. package/lib/routes/pornhub/users.ts +3 -5
  156. package/lib/routes/resonac/namespace.ts +6 -0
  157. package/lib/routes/resonac/products.ts +85 -0
  158. package/lib/routes/rsshub/transform/html.ts +114 -75
  159. package/lib/routes/rsshub/transform/json.ts +14 -8
  160. package/lib/routes/sciencenet/user.ts +3 -1
  161. package/lib/routes/scmp/utils.ts +2 -2
  162. package/lib/routes/skeb/following-creators.ts +52 -0
  163. package/lib/routes/skeb/following-works.ts +52 -0
  164. package/lib/routes/skeb/friend-works.ts +52 -0
  165. package/lib/routes/skeb/index.ts +131 -0
  166. package/lib/routes/skeb/namespace.ts +6 -0
  167. package/lib/routes/skeb/search.ts +77 -0
  168. package/lib/routes/skeb/templates/creator.art +8 -0
  169. package/lib/routes/skeb/templates/work.art +10 -0
  170. package/lib/routes/skeb/utils.ts +155 -0
  171. package/lib/routes/skeb/works.ts +88 -0
  172. package/lib/routes/skebetter/illust.ts +83 -0
  173. package/lib/routes/skebetter/index.ts +83 -0
  174. package/lib/routes/skebetter/manga.ts +65 -0
  175. package/lib/routes/skebetter/namespace.ts +6 -0
  176. package/lib/routes/skebetter/utils.ts +72 -0
  177. package/lib/routes/spankbang/namespace.ts +6 -0
  178. package/lib/routes/spankbang/new-videos.ts +90 -0
  179. package/lib/routes/spankbang/templates/video.art +7 -0
  180. package/lib/routes/straitstimes/index.ts +135 -0
  181. package/lib/routes/straitstimes/namespace.ts +7 -0
  182. package/lib/routes/straitstimes/templates/description.art +27 -0
  183. package/lib/routes/szftedu/dongtai.ts +62 -0
  184. package/lib/routes/szftedu/gonggao.ts +62 -0
  185. package/lib/routes/szftedu/namespace.ts +6 -0
  186. package/lib/routes/the/index.ts +1 -1
  187. package/lib/routes/tkww/index.ts +83 -0
  188. package/lib/routes/tkww/namespace.ts +6 -0
  189. package/lib/routes/ttv/index.ts +1 -1
  190. package/lib/routes/tvb/news.ts +2 -1
  191. package/lib/routes/twitter/api/mobile-api/login.ts +5 -0
  192. package/lib/routes/twitter/api/web-api/api.ts +16 -10
  193. package/lib/routes/twitter/api/web-api/constants.ts +1 -1
  194. package/lib/routes/twitter/api/web-api/utils.ts +94 -56
  195. package/lib/routes/twitter/list.ts +4 -12
  196. package/lib/routes/twitter/media.ts +13 -4
  197. package/lib/routes/twitter/user.ts +15 -6
  198. package/lib/routes/udn/breaking-news.ts +2 -2
  199. package/lib/routes/uestc/gr.ts +65 -37
  200. package/lib/routes/uestc/jwc.ts +49 -28
  201. package/lib/routes/wechat/ershcimi.ts +4 -2
  202. package/lib/routes/weibo/user.ts +10 -2
  203. package/lib/routes/xaut/index.ts +13 -20
  204. package/lib/routes/xaut/namespace.ts +1 -1
  205. package/lib/routes/xbookcn/blog.ts +66 -0
  206. package/lib/routes/xbookcn/namespace.ts +6 -0
  207. package/lib/routes/xiaoyuzhou/podcast.ts +35 -7
  208. package/lib/routes/xueqiu/cookies.ts +5 -3
  209. package/lib/routes/xueqiu/stock-info.ts +6 -12
  210. package/lib/routes/yande/namespace.ts +1 -1
  211. package/lib/routes/yande/post.ts +6 -6
  212. package/lib/routes/zaobao/util.ts +41 -43
  213. package/lib/routes/zhihu/activities.ts +2 -1
  214. package/lib/routes/zhihu/timeline.ts +6 -1
  215. package/lib/routes/zhihu/utils.ts +1 -1
  216. package/lib/routes/zjut/cs/index.ts +105 -0
  217. package/lib/routes/zjut/jwc/index.ts +117 -0
  218. package/lib/utils/cache/redis.ts +1 -1
  219. package/package.json +35 -36
  220. package/lib/routes/a9vg/a9vg.ts +0 -45
  221. package/lib/routes/gov/ndrc/zfxxgk/articles.ts +0 -73
  222. package/lib/routes-deprecated/hko/weather.js +0 -44
@@ -0,0 +1,264 @@
1
+ import { Route } from '@/types';
2
+
3
+ import cache from '@/utils/cache';
4
+ import got from '@/utils/got';
5
+ import { load } from 'cheerio';
6
+ import { parseDate } from '@/utils/parse-date';
7
+
8
+ export const handler = async (ctx) => {
9
+ const { id = '9' } = ctx.req.param();
10
+ const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 20;
11
+
12
+ const domain = 'www.cisia.org';
13
+ const rootUrl = `http://${domain}`;
14
+ const currentUrl = new URL(`site/term/${id}.html`, rootUrl).href;
15
+
16
+ const { data: response } = await got(currentUrl);
17
+
18
+ const $ = load(response);
19
+
20
+ let items = $('ul.list_first li')
21
+ .slice(0, limit)
22
+ .toArray()
23
+ .map((item) => {
24
+ item = $(item);
25
+
26
+ const a = item.find('a');
27
+
28
+ return {
29
+ title: a.text(),
30
+ pubDate: parseDate(item.find('span.time').text()),
31
+ link: new URL(a.prop('href'), rootUrl).href,
32
+ };
33
+ });
34
+
35
+ items = await Promise.all(
36
+ items.map((item) =>
37
+ cache.tryGet(item.link, async () => {
38
+ if (!/^https?:\/\/www\.cisia\.org(\/[^\s]*)?$/.test(item.link)) {
39
+ return item;
40
+ }
41
+
42
+ const { data: detailResponse } = await got(item.link);
43
+
44
+ const $$ = load(detailResponse);
45
+
46
+ const title = $$('div.TextTitle').text();
47
+ const description = $$('div.NewsText').html();
48
+ const pubDate = $$('div.shar')
49
+ .text()
50
+ .match(/(\d{4}-\d{2}-\d{2})/)?.[1];
51
+
52
+ item.title = title;
53
+ item.description = description;
54
+ item.pubDate = pubDate ? parseDate(pubDate) : item.pubDate;
55
+ item.author = $$('meta[name="Description"]').prop('content');
56
+ item.content = {
57
+ html: description,
58
+ text: $$('div.NewsText').text(),
59
+ };
60
+
61
+ return item;
62
+ })
63
+ )
64
+ );
65
+
66
+ const image = new URL($('div.logo img').prop('src'), rootUrl).href;
67
+
68
+ return {
69
+ title: $('title').text(),
70
+ description: $('meta[name="Description"]').prop('content'),
71
+ link: currentUrl,
72
+ item: items,
73
+ allowEmpty: true,
74
+ image,
75
+ author: $('meta[name="Keywords"]').prop('content'),
76
+ };
77
+ };
78
+
79
+ export const route: Route = {
80
+ path: '/:id?',
81
+ name: '栏目',
82
+ url: 'www.cisia.org',
83
+ maintainers: ['nczitzk'],
84
+ handler,
85
+ example: '/cisia/9',
86
+ parameters: { id: '栏目 id,默认为 `9`,即协会动态,可在对应分类页 URL 中找到' },
87
+ description: `:::tip
88
+ 若订阅 [市场信息](http://www.cisia.org/site/term/12.html),网址为 \`http://www.cisia.org/site/term/12.html\`。截取 \`https://www.cisia.org/site/term/\` 到末尾 \`.html\` 的部分 \`12\` 作为参数填入,此时路由为 [\`/cisia/12\`](https://rsshub.app/cisia/12)。
89
+ :::
90
+
91
+ <details>
92
+ <summary>更多分类</summary>
93
+
94
+ #### [分支机构信息](http://www.cisia.org/site/term/14.html)
95
+
96
+ | [企业动态](http://www.cisia.org/site/term/17.html) | [产品展示](http://www.cisia.org/site/term/18.html) |
97
+ | -------------------------------------------------- | -------------------------------------------------- |
98
+ | [17](https://rsshub.app/cisia/17) | [18](https://rsshub.app/cisia/18) |
99
+
100
+ #### [新闻中心](http://www.cisia.org/site/term/8.html)
101
+
102
+ | [协会动态](http://www.cisia.org/site/term/9.html) | [行业新闻](http://www.cisia.org/site/term/10.html) | [通知公告](http://www.cisia.org/site/term/11.html) | [市场信息](http://www.cisia.org/site/term/12.html) |
103
+ | ------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
104
+ | [9](https://rsshub.app/cisia/9) | [10](https://rsshub.app/cisia/10) | [11](https://rsshub.app/cisia/11) | [12](https://rsshub.app/cisia/12) |
105
+
106
+ #### [政策法规](http://www.cisia.org/site/term/19.html)
107
+
108
+ | [宏观聚焦](http://www.cisia.org/site/term/20.html) | [技术园区](http://www.cisia.org/site/term/396.html) |
109
+ | -------------------------------------------------- | --------------------------------------------------- |
110
+ | [20](https://rsshub.app/cisia/20) | [396](https://rsshub.app/cisia/396) |
111
+
112
+ #### [合作交流](http://www.cisia.org/site/term/22.html)
113
+
114
+ | [国际交流](http://www.cisia.org/site/term/23.html) | [行业交流](http://www.cisia.org/site/term/24.html) | [企业调研](http://www.cisia.org/site/term/25.html) | [会展信息](http://www.cisia.org/site/term/84.html) | [宣传专题](http://www.cisia.org/site/term/430.html) |
115
+ | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | --------------------------------------------------- |
116
+ | [23](https://rsshub.app/cisia/23) | [24](https://rsshub.app/cisia/24) | [25](https://rsshub.app/cisia/25) | [84](https://rsshub.app/cisia/84) | [430](https://rsshub.app/cisia/430) |
117
+
118
+ #### [党建工作](http://www.cisia.org/site/term/26.html)
119
+
120
+ | [党委文件](http://www.cisia.org/site/term/27.html) | [学习园地](http://www.cisia.org/site/term/28.html) | [两会专题](http://www.cisia.org/site/term/443.html) |
121
+ | -------------------------------------------------- | -------------------------------------------------- | --------------------------------------------------- |
122
+ | [27](https://rsshub.app/cisia/27) | [28](https://rsshub.app/cisia/28) | [443](https://rsshub.app/cisia/443) |
123
+
124
+ #### [网上服务平台](http://www.cisia.org/site/term/29.html)
125
+
126
+ | [前沿科技](http://www.cisia.org/site/term/31.html) | [新材料新技术](http://www.cisia.org/site/term/133.html) | [文件共享](http://www.cisia.org/site/term/30.html) |
127
+ | -------------------------------------------------- | ------------------------------------------------------- | -------------------------------------------------- |
128
+ | [31](https://rsshub.app/cisia/31) | [133](https://rsshub.app/cisia/133) | [30](https://rsshub.app/cisia/30) |
129
+
130
+ #### [会员社区](http://www.cisia.org/site/term/34.html)
131
+
132
+ | [会员分布](http://www.cisia.org/site/term/35.html) | [会员风采](http://www.cisia.org/site/term/68.html) |
133
+ | -------------------------------------------------- | -------------------------------------------------- |
134
+ | [35](https://rsshub.app/cisia/35) | [68](https://rsshub.app/cisia/68) |
135
+
136
+ </details>
137
+ `,
138
+ categories: ['government'],
139
+
140
+ features: {
141
+ requireConfig: false,
142
+ requirePuppeteer: false,
143
+ antiCrawler: false,
144
+ supportRadar: true,
145
+ supportBT: false,
146
+ supportPodcast: false,
147
+ supportScihub: false,
148
+ },
149
+ radar: [
150
+ {
151
+ source: ['www.cisia.org/site/term/:id'],
152
+ target: (params) => {
153
+ const id = params.id.replace(/\.html/, '');
154
+
155
+ return id ? `/${id}` : '';
156
+ },
157
+ },
158
+ {
159
+ title: '分支机构信息 - 企业动态',
160
+ source: ['www.cisia.org/site/term/17.html'],
161
+ target: '/17',
162
+ },
163
+ {
164
+ title: '分支机构信息 - 产品展示',
165
+ source: ['www.cisia.org/site/term/18.html'],
166
+ target: '/18',
167
+ },
168
+ {
169
+ title: '新闻中心 - 协会动态',
170
+ source: ['www.cisia.org/site/term/9.html'],
171
+ target: '/9',
172
+ },
173
+ {
174
+ title: '新闻中心 - 行业新闻',
175
+ source: ['www.cisia.org/site/term/10.html'],
176
+ target: '/10',
177
+ },
178
+ {
179
+ title: '新闻中心 - 通知公告',
180
+ source: ['www.cisia.org/site/term/11.html'],
181
+ target: '/11',
182
+ },
183
+ {
184
+ title: '新闻中心 - 市场信息',
185
+ source: ['www.cisia.org/site/term/12.html'],
186
+ target: '/12',
187
+ },
188
+ {
189
+ title: '政策法规 - 宏观聚焦',
190
+ source: ['www.cisia.org/site/term/20.html'],
191
+ target: '/20',
192
+ },
193
+ {
194
+ title: '政策法规 - 技术园区',
195
+ source: ['www.cisia.org/site/term/396.html'],
196
+ target: '/396',
197
+ },
198
+ {
199
+ title: '合作交流 - 国际交流',
200
+ source: ['www.cisia.org/site/term/23.html'],
201
+ target: '/23',
202
+ },
203
+ {
204
+ title: '合作交流 - 行业交流',
205
+ source: ['www.cisia.org/site/term/24.html'],
206
+ target: '/24',
207
+ },
208
+ {
209
+ title: '合作交流 - 企业调研',
210
+ source: ['www.cisia.org/site/term/25.html'],
211
+ target: '/25',
212
+ },
213
+ {
214
+ title: '合作交流 - 会展信息',
215
+ source: ['www.cisia.org/site/term/84.html'],
216
+ target: '/84',
217
+ },
218
+ {
219
+ title: '合作交流 - 宣传专题',
220
+ source: ['www.cisia.org/site/term/430.html'],
221
+ target: '/430',
222
+ },
223
+ {
224
+ title: '党建工作 - 党委文件',
225
+ source: ['www.cisia.org/site/term/27.html'],
226
+ target: '/27',
227
+ },
228
+ {
229
+ title: '党建工作 - 学习园地',
230
+ source: ['www.cisia.org/site/term/28.html'],
231
+ target: '/28',
232
+ },
233
+ {
234
+ title: '党建工作 - 两会专题',
235
+ source: ['www.cisia.org/site/term/443.html'],
236
+ target: '/443',
237
+ },
238
+ {
239
+ title: '网上服务平台 - 前沿科技',
240
+ source: ['www.cisia.org/site/term/31.html'],
241
+ target: '/31',
242
+ },
243
+ {
244
+ title: '网上服务平台 - 新材料新技术',
245
+ source: ['www.cisia.org/site/term/133.html'],
246
+ target: '/133',
247
+ },
248
+ {
249
+ title: '网上服务平台 - 文件共享',
250
+ source: ['www.cisia.org/site/term/30.html'],
251
+ target: '/30',
252
+ },
253
+ {
254
+ title: '会员社区 - 会员分布',
255
+ source: ['www.cisia.org/site/term/35.html'],
256
+ target: '/35',
257
+ },
258
+ {
259
+ title: '会员社区 - 会员风采',
260
+ source: ['www.cisia.org/site/term/68.html'],
261
+ target: '/68',
262
+ },
263
+ ],
264
+ };
@@ -0,0 +1,8 @@
1
+ import type { Namespace } from '@/types';
2
+
3
+ export const namespace: Namespace = {
4
+ name: '中国无机盐工业协会',
5
+ url: 'www.cisia.org',
6
+ categories: ['government'],
7
+ description: '',
8
+ };
@@ -0,0 +1,10 @@
1
+ import type { Namespace } from '@/types';
2
+
3
+ export const namespace: Namespace = {
4
+ name: 'China Jiliang University',
5
+ url: 'www.cjlu.edu.cn',
6
+
7
+ zh: {
8
+ name: '中国计量大学',
9
+ },
10
+ };
@@ -0,0 +1,107 @@
1
+ import { Route } from '@/types';
2
+ import ofetch from '@/utils/ofetch';
3
+ import { load } from 'cheerio';
4
+ import { parseDate } from '@/utils/parse-date';
5
+ import cache from '@/utils/cache';
6
+ import timezone from '@/utils/timezone';
7
+
8
+ const host = 'https://yjsy.cjlu.edu.cn/';
9
+
10
+ const titleMap = new Map([
11
+ ['yjstz', '中量大研究生院 —— 研究生通知'],
12
+ ['jstz', '中量大研究生院 —— 教师通知'],
13
+ ]);
14
+
15
+ export const route: Route = {
16
+ path: '/yjsy/:cate',
17
+ categories: ['university'],
18
+ example: '/cjlu/yjsy/yjstz',
19
+ parameters: {
20
+ cate: '订阅的类型,支持 yjstz(研究生通知)和 jstz(教师通知)',
21
+ },
22
+ features: {
23
+ requireConfig: false,
24
+ requirePuppeteer: false,
25
+ antiCrawler: false,
26
+ supportRadar: true,
27
+ supportBT: false,
28
+ supportPodcast: false,
29
+ supportScihub: false,
30
+ },
31
+ radar: [
32
+ {
33
+ title: '研究生通知',
34
+ source: ['yjsy.cjlu.edu.cn/index/yjstz/:suffix', 'yjsy.cjlu.edu.cn/index/yjstz.htm'],
35
+ target: '/yjsy/yjstz',
36
+ },
37
+ {
38
+ title: '教师通知',
39
+ source: ['yjsy.cjlu.edu.cn/index/jstz/:suffix', 'yjsy.cjlu.edu.cn/index/jstz.htm'],
40
+ target: '/yjsy/jstz',
41
+ },
42
+ ],
43
+ name: '研究生院',
44
+ maintainers: ['chrisis58'],
45
+ handler,
46
+ description: `| 研究生通知 | 教师通知 |
47
+ | -------- | -------- |
48
+ | yjstz | jstz |`,
49
+ };
50
+
51
+ async function handler(ctx) {
52
+ const cate = ctx.req.param('cate');
53
+
54
+ const response = await ofetch(`${cate}.htm`, {
55
+ baseURL: `${host}/index/`,
56
+ responseType: 'text',
57
+ });
58
+
59
+ const $ = load(response);
60
+
61
+ const list = $('div.grid685.right div.body ul')
62
+ .find('li')
63
+ .toArray()
64
+ .map((element) => {
65
+ const item = $(element);
66
+
67
+ const a = item.find('a').first();
68
+
69
+ const timeStr = item.find('span').first().text().trim();
70
+ const href = a.attr('href') ?? '';
71
+ const route = href.startsWith('../') ? href.replace(/^\.\.\//, '') : href;
72
+
73
+ return {
74
+ title: a.attr('title') ?? titleMap.get(cate),
75
+ pubDate: timezone(parseDate(timeStr, 'YYYY/MM/DD'), +8),
76
+ link: `${host}${route}`,
77
+ description: '',
78
+ };
79
+ });
80
+
81
+ const items = await Promise.all(
82
+ list.map((item) =>
83
+ cache.tryGet(item.link, async () => {
84
+ if (!item.link || item.link === host) {
85
+ return item;
86
+ }
87
+
88
+ const res = await ofetch(item.link, {
89
+ responseType: 'text',
90
+ });
91
+ const $ = load(res);
92
+
93
+ const content = $('#vsb_content').html() ?? '';
94
+ const attachments = $('form[name="_newscontent_fromname"] div ul').html() ?? '';
95
+
96
+ item.description = `${content}<br>${attachments}`;
97
+ return item;
98
+ })
99
+ )
100
+ );
101
+
102
+ return {
103
+ title: titleMap.get(cate),
104
+ link: `https://yjsy.cjlu.edu.cn/index/${cate}.htm`,
105
+ item: items,
106
+ };
107
+ }
@@ -4,6 +4,8 @@ import got from '@/utils/got';
4
4
  import { load } from 'cheerio';
5
5
  import { parseDate } from '@/utils/parse-date';
6
6
  import { ProcessItem } from './utils';
7
+ import parser from '@/utils/rss-parser';
8
+ import logger from '@/utils/logger';
7
9
 
8
10
  const rootUrl = 'https://navi.cnki.net';
9
11
 
@@ -22,16 +24,43 @@ export const route: Route = {
22
24
  },
23
25
  radar: [
24
26
  {
25
- source: ['navi.cnki.net/knavi/journals/:name/detail'],
27
+ source: ['navi.cnki.net/knavi/journals/:name/detail', 'rss.cnki.net/kns/rss.aspx?Journal=:name&Virtual=knavi'],
26
28
  },
27
29
  ],
28
30
  name: '期刊',
29
- maintainers: ['Fatpandac', 'Derekmini'],
31
+ maintainers: ['Fatpandac', 'Derekmini', 'pseudoyu'],
30
32
  handler,
31
33
  };
32
34
 
33
35
  async function handler(ctx) {
34
36
  const name = ctx.req.param('name');
37
+ const rssUrl = `https://rss.cnki.net/kns/rss.aspx?Journal=${name}&Virtual=knavi`;
38
+
39
+ const rssResponse = await got.get(rssUrl);
40
+
41
+ try {
42
+ const feed = await parser.parseString(rssResponse.data);
43
+
44
+ if (feed.items && feed.items.length !== 0) {
45
+ const items = feed.items.map((item) => ({
46
+ title: item.title,
47
+ description: item.content,
48
+ pubDate: parseDate(item.pubDate),
49
+ link: item.link,
50
+ author: item.author,
51
+ }));
52
+
53
+ return {
54
+ title: feed.title,
55
+ link: feed.link,
56
+ description: feed.description,
57
+ item: items,
58
+ };
59
+ }
60
+ } catch (error) {
61
+ logger.error(error);
62
+ }
63
+
35
64
  const journalUrl = `${rootUrl}/knavi/journals/${name}/detail`;
36
65
  const title = await got.get(journalUrl).then((res) => load(res.data)('head > title').text());
37
66
 
@@ -0,0 +1,54 @@
1
+ import { Route } from '@/types';
2
+ import ofetch from '@/utils/ofetch';
3
+ import { parseDate } from '@/utils/parse-date';
4
+
5
+ export const route: Route = {
6
+ path: ['/blog'],
7
+ name: 'Blog',
8
+ url: 'cohere.com/blog',
9
+ maintainers: ['Loongphy'],
10
+ handler,
11
+ example: '/cohere/blog',
12
+ description: 'Cohere is a platform for building AI applications.',
13
+ categories: ['blog'],
14
+ features: {
15
+ requireConfig: false,
16
+ requirePuppeteer: false,
17
+ antiCrawler: false,
18
+ supportRadar: true,
19
+ supportBT: false,
20
+ supportPodcast: false,
21
+ supportScihub: false,
22
+ },
23
+ radar: [
24
+ {
25
+ source: ['cohere.com'],
26
+ },
27
+ ],
28
+ };
29
+
30
+ async function handler() {
31
+ const { posts: data } = await ofetch('https://cohere-ai.ghost.io/ghost/api/content/posts', {
32
+ params: {
33
+ key: '572d288a9364f8e4186af1d60a',
34
+ limit: 'all',
35
+ include: ['authors', 'tags'],
36
+ filter: 'tag:-hash-hidden+tag:-llmu',
37
+ },
38
+ });
39
+
40
+ const items = data.map((item) => ({
41
+ title: item.title,
42
+ link: 'https://cohere.com/blog/' + item.slug,
43
+ description: item.excerpt,
44
+ pubDate: parseDate(item.published_at),
45
+ author: item.authors.map((author) => author.name).join(', '),
46
+ category: item.tags.map((tag) => tag.name),
47
+ }));
48
+
49
+ return {
50
+ title: 'The Cohere Blog',
51
+ link: 'https://cohere.com/blog',
52
+ item: items,
53
+ };
54
+ }
@@ -0,0 +1,6 @@
1
+ import type { Namespace } from '@/types';
2
+
3
+ export const namespace: Namespace = {
4
+ name: 'Cohere',
5
+ url: 'cohere.com',
6
+ };
@@ -9,7 +9,13 @@ export const route: Route = {
9
9
  example: '/coolapk/dyh/1524',
10
10
  parameters: { dyhId: '看看号ID' },
11
11
  features: {
12
- requireConfig: false,
12
+ requireConfig: [
13
+ {
14
+ name: 'ALLOW_USER_HOTLINK_TEMPLATE',
15
+ optional: true,
16
+ description: '设置为`true`并添加`image_hotlink_template`参数来代理图片',
17
+ },
18
+ ],
13
19
  requirePuppeteer: false,
14
20
  antiCrawler: false,
15
21
  supportBT: false,
@@ -72,7 +72,13 @@ export const route: Route = {
72
72
  example: '/coolapk/hot',
73
73
  parameters: { type: '默认为`jrrm`', period: '默认为`daily`' },
74
74
  features: {
75
- requireConfig: false,
75
+ requireConfig: [
76
+ {
77
+ name: 'ALLOW_USER_HOTLINK_TEMPLATE',
78
+ optional: true,
79
+ description: '设置为`true`并添加`image_hotlink_template`参数来代理图片',
80
+ },
81
+ ],
76
82
  requirePuppeteer: false,
77
83
  antiCrawler: false,
78
84
  supportBT: false,
@@ -9,7 +9,13 @@ export const route: Route = {
9
9
  example: '/coolapk/huati/iPhone',
10
10
  parameters: { tag: '话题名称' },
11
11
  features: {
12
- requireConfig: false,
12
+ requireConfig: [
13
+ {
14
+ name: 'ALLOW_USER_HOTLINK_TEMPLATE',
15
+ optional: true,
16
+ description: '设置为`true`并添加`image_hotlink_template`参数来代理图片',
17
+ },
18
+ ],
13
19
  requirePuppeteer: false,
14
20
  antiCrawler: false,
15
21
  supportBT: false,
@@ -3,4 +3,10 @@ import type { Namespace } from '@/types';
3
3
  export const namespace: Namespace = {
4
4
  name: '酷安',
5
5
  url: 'coolapk.com',
6
+ description: `
7
+ :::tip
8
+ 即日起,多数路由图片防盗链。
9
+ 需要将 \`ALLOW_USER_HOTLINK_TEMPLATE\` 环境变量设置为 \`true\` ,然后配置\`image_hotlink_template\` 。
10
+ 详见 [#16715](https://github.com/DIYgod/RSSHub/issues/16715)
11
+ :::`,
6
12
  };
@@ -8,7 +8,13 @@ export const route: Route = {
8
8
  example: '/coolapk/toutiao',
9
9
  parameters: { type: '默认为history' },
10
10
  features: {
11
- requireConfig: false,
11
+ requireConfig: [
12
+ {
13
+ name: 'ALLOW_USER_HOTLINK_TEMPLATE',
14
+ optional: true,
15
+ description: '设置为`true`并添加`image_hotlink_template`参数来代理图片',
16
+ },
17
+ ],
12
18
  requirePuppeteer: false,
13
19
  antiCrawler: false,
14
20
  supportBT: false,
@@ -3,12 +3,18 @@ import got from '@/utils/got';
3
3
  import utils from './utils';
4
4
 
5
5
  export const route: Route = {
6
- path: ['/tuwen/:type?', '/tuwen-xinxian'],
6
+ path: ['/tuwen/:type?'],
7
7
  categories: ['social-media'],
8
8
  example: '/coolapk/tuwen',
9
9
  parameters: { type: '默认为hot' },
10
10
  features: {
11
- requireConfig: false,
11
+ requireConfig: [
12
+ {
13
+ name: 'ALLOW_USER_HOTLINK_TEMPLATE',
14
+ optional: true,
15
+ description: '设置为`true`并添加`image_hotlink_template`参数来代理图片',
16
+ },
17
+ ],
12
18
  requirePuppeteer: false,
13
19
  antiCrawler: false,
14
20
  supportBT: false,
@@ -25,16 +31,15 @@ export const route: Route = {
25
31
 
26
32
  async function handler(ctx) {
27
33
  const type = ctx.req.param('type') || 'hot';
28
- const requestPath = ctx.req.path;
29
34
  let feedTitle;
30
35
  const fullUrl = new URL('/v6/page/dataList', utils.base_url);
31
- if (requestPath.startsWith('/coolapk/tuwen-xinxian') || type === 'latest') {
36
+ if (type === 'latest') {
32
37
  // 实时
33
38
  fullUrl.searchParams.append('url', `/feed/digestList?${new URLSearchParams('cacheExpires=300&type=12&message_status=all&is_html_article=1&filterEmptyPicture=1&filterTag=二手交易,酷安自贸区,薅羊毛小分队').toString()}`);
34
39
  fullUrl.searchParams.append('title', '新鲜图文');
35
40
  fullUrl.searchParams.append('subTitle', '');
36
41
  feedTitle = '酷安 - 新鲜图文';
37
- } else if (requestPath.startsWith('/coolapk/tuwen')) {
42
+ } else {
38
43
  // 精选
39
44
  fullUrl.searchParams.append('url', `#/feed/digestList?${new URLSearchParams('type=12&is_html_article=1&recommend=3,4').toString()}`);
40
45
  fullUrl.searchParams.append('title', '图文');
@@ -9,7 +9,13 @@ export const route: Route = {
9
9
  example: '/coolapk/user/3177668/dynamic',
10
10
  parameters: { uid: '在个人界面右上分享-复制链接获取' },
11
11
  features: {
12
- requireConfig: false,
12
+ requireConfig: [
13
+ {
14
+ name: 'ALLOW_USER_HOTLINK_TEMPLATE',
15
+ optional: true,
16
+ description: '设置为`true`并添加`image_hotlink_template`参数来代理图片',
17
+ },
18
+ ],
13
19
  requirePuppeteer: false,
14
20
  antiCrawler: false,
15
21
  supportBT: false,
@@ -15,13 +15,13 @@ export const route: Route = {
15
15
  features: {
16
16
  requireConfig: false,
17
17
  requirePuppeteer: false,
18
- antiCrawler: false,
18
+ antiCrawler: true,
19
19
  supportBT: false,
20
20
  supportPodcast: false,
21
21
  supportScihub: false,
22
22
  },
23
23
  name: '票务更新',
24
- maintainers: ['hoilc'],
24
+ maintainers: ['hoilc', 'Konano'],
25
25
  handler,
26
26
  description: `城市、分类名、子分类名,请参见[大麦网搜索页面](https://search.damai.cn/search.htm)`,
27
27
  };
@@ -55,6 +55,7 @@ async function handler(ctx) {
55
55
  return {
56
56
  title: `大麦网票务 - ${city || '全国'} - ${category || '全部分类'}${subcategory ? ' - ' + subcategory : ''}${keyword ? ' - ' + keyword : ''}`,
57
57
  link: 'https://search.damai.cn/search.htm',
58
+ allowEmpty: true,
58
59
  item: list.map((item) => ({
59
60
  title: item.nameNoHtml,
60
61
  author: item.actors ? load(item.actors, null, false).text() : '大麦网',