rsshub 1.0.0-master.c144a18 → 1.0.0-master.c15aee0

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 (201) hide show
  1. package/lib/config.js +5 -0
  2. package/lib/radar-rules.js +22 -151
  3. package/lib/router.js +16 -39
  4. package/lib/routes/copymanga/comic.js +7 -1
  5. package/lib/routes/coronavirus/dxy-data.js +1 -1
  6. package/lib/routes/coronavirus/dxy.js +2 -2
  7. package/lib/routes/ncm/djradio.js +59 -44
  8. package/lib/routes/ncm/templates/djradio-content.art +11 -0
  9. package/lib/routes/rsshub/routes.js +7 -6
  10. package/lib/routes/tencent/wechat/tgchannel.js +3 -0
  11. package/lib/routes/weibo/timeline.js +72 -124
  12. package/lib/routes/weibo/user.js +1 -0
  13. package/lib/routes/weibo/utils.js +6 -2
  14. package/lib/v2/12306/index.js +108 -0
  15. package/lib/v2/12306/maintainer.js +4 -0
  16. package/lib/v2/12306/radar.js +28 -0
  17. package/lib/v2/12306/router.js +4 -0
  18. package/lib/v2/12306/templates/train.art +31 -0
  19. package/lib/{routes → v2}/12306/zxdt.js +0 -0
  20. package/lib/v2/app-center/maintainer.js +3 -0
  21. package/lib/v2/app-center/radar.js +13 -0
  22. package/lib/v2/app-center/release.js +120 -0
  23. package/lib/v2/app-center/router.js +3 -0
  24. package/lib/v2/app-center/templates/description.art +24 -0
  25. package/lib/v2/baozimh/index.js +8 -2
  26. package/lib/v2/baozimh/templates/desc.art +3 -0
  27. package/lib/{routes → v2}/bioone/featured.js +9 -8
  28. package/lib/v2/bioone/journal.js +58 -0
  29. package/lib/v2/bioone/maintainer.js +4 -0
  30. package/lib/v2/bioone/radar.js +19 -0
  31. package/lib/v2/bioone/router.js +4 -0
  32. package/lib/v2/cahkms/index.js +69 -0
  33. package/lib/v2/cahkms/maintainer.js +3 -0
  34. package/lib/v2/cahkms/radar.js +13 -0
  35. package/lib/v2/cahkms/router.js +3 -0
  36. package/lib/v2/cahkms/templates/description.art +15 -0
  37. package/lib/v2/ccreports/index.js +41 -0
  38. package/lib/v2/ccreports/maintainer.js +3 -0
  39. package/lib/v2/ccreports/radar.js +13 -0
  40. package/lib/v2/ccreports/router.js +3 -0
  41. package/lib/v2/cdi/index.js +61 -0
  42. package/lib/v2/cdi/maintainer.js +3 -0
  43. package/lib/v2/cdi/radar.js +13 -0
  44. package/lib/v2/cdi/router.js +3 -0
  45. package/lib/v2/cntv/column.js +29 -0
  46. package/lib/v2/cntv/maintainer.js +3 -0
  47. package/lib/v2/cntv/radar.js +13 -0
  48. package/lib/v2/cntv/router.js +3 -0
  49. package/lib/v2/cntv/templates/column.art +4 -0
  50. package/lib/v2/douban/other/explore.js +24 -7
  51. package/lib/v2/douban/templates/explore.art +7 -0
  52. package/lib/v2/epicgames/supportedList.js +1 -1
  53. package/lib/v2/github/comments.js +1 -1
  54. package/lib/v2/gov/huizhou/zwgk/index.js +58 -0
  55. package/lib/v2/gov/maintainer.js +2 -0
  56. package/lib/v2/gov/radar.js +58 -4
  57. package/lib/v2/gov/router.js +3 -0
  58. package/lib/v2/gov/shanghai/wsjkw/yqtb/index.js +33 -0
  59. package/lib/v2/gov/sichuan/deyang/govpulicinfo.js +115 -0
  60. package/lib/v2/gov/sichuan/deyang/templates/govPublicInfo.art +41 -0
  61. package/lib/v2/hackernews/index.js +9 -3
  62. package/lib/v2/hackernews/maintainer.js +1 -1
  63. package/lib/v2/hackernews/radar.js +1 -1
  64. package/lib/v2/hackernews/router.js +1 -1
  65. package/lib/v2/hizu/index.js +76 -0
  66. package/lib/v2/hizu/maintainer.js +3 -0
  67. package/lib/v2/hizu/radar.js +13 -0
  68. package/lib/v2/hizu/router.js +3 -0
  69. package/lib/v2/informs/templates/content.art +1 -1
  70. package/lib/v2/iresearch/maintainer.js +3 -0
  71. package/lib/v2/iresearch/radar.js +13 -0
  72. package/lib/v2/iresearch/report.js +60 -0
  73. package/lib/v2/iresearch/router.js +3 -0
  74. package/lib/v2/iresearch/templates/report.art +5 -0
  75. package/lib/{routes → v2}/ithome/index.js +3 -0
  76. package/lib/v2/ithome/maintainer.js +3 -0
  77. package/lib/v2/ithome/radar.js +97 -1
  78. package/lib/{routes → v2}/ithome/ranking.js +0 -0
  79. package/lib/v2/ithome/router.js +3 -0
  80. package/lib/v2/ithome/tag.js +48 -0
  81. package/lib/v2/javdb/utils.js +1 -1
  82. package/lib/v2/javlibrary/bestrated.js +9 -0
  83. package/lib/v2/javlibrary/bestreviews.js +9 -0
  84. package/lib/v2/javlibrary/genre.js +10 -0
  85. package/lib/v2/javlibrary/maintainer.js +11 -0
  86. package/lib/v2/javlibrary/mostwanted.js +9 -0
  87. package/lib/v2/javlibrary/newentries.js +8 -0
  88. package/lib/v2/javlibrary/newrelease.js +9 -0
  89. package/lib/v2/javlibrary/radar.js +79 -0
  90. package/lib/v2/javlibrary/router.js +19 -0
  91. package/lib/v2/javlibrary/star.js +10 -0
  92. package/lib/v2/javlibrary/templates/description.art +17 -0
  93. package/lib/v2/javlibrary/update.js +8 -0
  94. package/lib/v2/javlibrary/user.js +10 -0
  95. package/lib/v2/javlibrary/utils.js +98 -0
  96. package/lib/v2/lanqiao/author.js +0 -2
  97. package/lib/v2/lanqiao/courses.js +25 -8
  98. package/lib/v2/lanqiao/maintainer.js +1 -1
  99. package/lib/v2/lanqiao/questions.js +5 -5
  100. package/lib/v2/lanqiao/radar.js +4 -4
  101. package/lib/v2/lanqiao/router.js +1 -1
  102. package/lib/v2/lkong/forum.js +54 -0
  103. package/lib/v2/lkong/maintainer.js +4 -0
  104. package/lib/v2/lkong/query.js +82 -0
  105. package/lib/v2/lkong/radar.js +19 -0
  106. package/lib/v2/lkong/router.js +4 -0
  107. package/lib/v2/lkong/templates/content.art +18 -0
  108. package/lib/v2/lkong/templates/quote.art +23 -0
  109. package/lib/v2/lkong/thread.js +57 -0
  110. package/lib/v2/nikkei-asia/index.js +40 -0
  111. package/lib/v2/nikkei-asia/maintainer.js +3 -0
  112. package/lib/v2/nikkei-asia/radar.js +13 -0
  113. package/lib/v2/nikkei-asia/router.js +3 -0
  114. package/lib/v2/polkaworld/home.js +24 -0
  115. package/lib/v2/polkaworld/maintainer.js +3 -0
  116. package/lib/v2/polkaworld/radar.js +13 -0
  117. package/lib/v2/polkaworld/router.js +3 -0
  118. package/lib/v2/producthunt/maintainer.js +3 -0
  119. package/lib/v2/producthunt/radar.js +13 -0
  120. package/lib/v2/producthunt/router.js +3 -0
  121. package/lib/v2/producthunt/templates/descImg.art +5 -0
  122. package/lib/v2/producthunt/today.js +41 -0
  123. package/lib/v2/spotify/artist.js +41 -0
  124. package/lib/v2/spotify/maintainer.js +7 -0
  125. package/lib/v2/spotify/playlist.js +31 -0
  126. package/lib/v2/spotify/radar.js +37 -0
  127. package/lib/v2/spotify/router.js +7 -0
  128. package/lib/v2/spotify/saved.js +30 -0
  129. package/lib/v2/spotify/top.js +24 -0
  130. package/lib/v2/spotify/utils.js +62 -0
  131. package/lib/v2/stcn/index.js +71 -0
  132. package/lib/v2/stcn/maintainer.js +6 -0
  133. package/lib/v2/stcn/radar.js +31 -0
  134. package/lib/v2/stcn/router.js +3 -0
  135. package/lib/v2/swpu/bgw.js +58 -0
  136. package/lib/v2/swpu/dean.js +58 -0
  137. package/lib/v2/swpu/dxy.js +61 -0
  138. package/lib/v2/swpu/maintainer.js +6 -0
  139. package/lib/v2/swpu/radar.js +31 -0
  140. package/lib/v2/swpu/router.js +6 -0
  141. package/lib/v2/swpu/scs.js +58 -0
  142. package/lib/v2/swpu/utils.js +22 -0
  143. package/lib/v2/telegram/channel.js +13 -9
  144. package/lib/v2/telegram/templates/video.art +5 -0
  145. package/lib/v2/ustb/maintainer.js +24 -0
  146. package/lib/v2/ustb/radar.js +13 -0
  147. package/lib/v2/ustb/router.js +3 -0
  148. package/lib/v2/ustb/yjsy/news.js +464 -0
  149. package/lib/v2/verfghbw/maintainer.js +3 -0
  150. package/lib/{routes → v2}/verfghbw/press.js +13 -5
  151. package/lib/v2/verfghbw/radar.js +13 -0
  152. package/lib/v2/verfghbw/router.js +3 -0
  153. package/lib/v2/wallhaven/index.js +55 -0
  154. package/lib/v2/wallhaven/maintainer.js +4 -0
  155. package/lib/v2/wallhaven/radar.js +53 -0
  156. package/lib/v2/wallhaven/router.js +4 -0
  157. package/lib/v2/wallstreetcn/live.js +16 -7
  158. package/lib/v2/wyzxwk/article.js +65 -0
  159. package/lib/v2/wyzxwk/maintainer.js +3 -0
  160. package/lib/v2/wyzxwk/radar.js +13 -0
  161. package/lib/v2/wyzxwk/router.js +3 -0
  162. package/lib/v2/youku/channel.js +56 -0
  163. package/lib/v2/youku/maintainer.js +3 -0
  164. package/lib/v2/youku/radar.js +13 -0
  165. package/lib/v2/youku/router.js +3 -0
  166. package/lib/v2/youku/templates/channel.art +5 -0
  167. package/lib/v2/youzhiyouxing/maintainer.js +3 -0
  168. package/lib/v2/youzhiyouxing/materials.js +46 -0
  169. package/lib/v2/youzhiyouxing/radar.js +73 -0
  170. package/lib/v2/youzhiyouxing/router.js +3 -0
  171. package/lib/{routes → v2}/yxdzqb/index.js +7 -3
  172. package/lib/v2/yxdzqb/maintainer.js +3 -0
  173. package/lib/v2/yxdzqb/radar.js +13 -0
  174. package/lib/v2/yxdzqb/router.js +3 -0
  175. package/lib/v2/yxdzqb/templates/description.art +2 -0
  176. package/lib/v2/zaobao/index.js +2 -2
  177. package/lib/v2/zaobao/maintainer.js +1 -1
  178. package/lib/v2/zaobao/realtime.js +1 -1
  179. package/lib/v2/zaobao/router.js +2 -2
  180. package/lib/v2/zaobao/templates/zaobao.art +1 -1
  181. package/lib/v2/zhubai/index.js +29 -0
  182. package/lib/v2/zhubai/maintainer.js +3 -0
  183. package/lib/v2/zhubai/radar.js +12 -0
  184. package/lib/v2/zhubai/router.js +3 -0
  185. package/package.json +33 -30
  186. package/lib/routes/ccreports/index.js +0 -40
  187. package/lib/routes/cntv/cntv.js +0 -24
  188. package/lib/routes/iresearch/report.js +0 -63
  189. package/lib/routes/javlibrary/bestreviews.js +0 -11
  190. package/lib/routes/javlibrary/stars.js +0 -9
  191. package/lib/routes/javlibrary/users.js +0 -22
  192. package/lib/routes/javlibrary/utils.js +0 -68
  193. package/lib/routes/javlibrary/videos.js +0 -9
  194. package/lib/routes/lkong/forum.js +0 -75
  195. package/lib/routes/lkong/thread.js +0 -56
  196. package/lib/routes/producthunt/today.js +0 -24
  197. package/lib/routes/stcn/data.js +0 -84
  198. package/lib/routes/stcn/kuaixun.js +0 -91
  199. package/lib/routes/stcn/news.js +0 -85
  200. package/lib/routes/youku/channel.js +0 -56
  201. package/lib/routes/youzhiyouxing/materials.js +0 -29
package/lib/config.js CHANGED
@@ -63,6 +63,11 @@ const calculateValue = () => {
63
63
  disqus: {
64
64
  api_key: envs.DISQUS_API_KEY,
65
65
  },
66
+ spotify: {
67
+ clientId: envs.SPOTIFY_CLIENT_ID,
68
+ clientSecret: envs.SPOTIFY_CLIENT_SECRET,
69
+ refreshToken: envs.SPOTIFY_REFRESHTOKEN,
70
+ },
66
71
  twitter: {
67
72
  consumer_key: envs.TWITTER_CONSUMER_KEY,
68
73
  consumer_secret: envs.TWITTER_CONSUMER_SECRET,
@@ -975,94 +975,6 @@ module.exports = {
975
975
  ],
976
976
  },
977
977
 
978
- 'ithome.com': {
979
- _name: 'IT 之家',
980
- '.': [
981
- {
982
- title: '24 小时阅读榜',
983
- docs: 'https://docs.rsshub.app/new-media.html#it-zhi-jia',
984
- source: ['', '/*'],
985
- target: '/ithome/ranking/24h',
986
- },
987
- {
988
- title: '7 天最热',
989
- docs: 'https://docs.rsshub.app/new-media.html#it-zhi-jia',
990
- source: ['', '/*'],
991
- target: '/ithome/ranking/7days',
992
- },
993
- {
994
- title: '月榜',
995
- docs: 'https://docs.rsshub.app/new-media.html#it-zhi-jia',
996
- source: ['', '/*'],
997
- target: '/ithome/ranking/monthly',
998
- },
999
- ],
1000
- it: [
1001
- {
1002
- title: 'IT 资讯',
1003
- docs: 'https://docs.rsshub.app/new-media.html#it-zhi-jia',
1004
- source: '/',
1005
- target: '/ithome/it',
1006
- },
1007
- ],
1008
- soft: [
1009
- {
1010
- title: '软件之家',
1011
- docs: 'https://docs.rsshub.app/new-media.html#it-zhi-jia',
1012
- source: '/',
1013
- target: '/ithome/soft',
1014
- },
1015
- ],
1016
- win10: [
1017
- {
1018
- title: 'win10 之家',
1019
- docs: 'https://docs.rsshub.app/new-media.html#it-zhi-jia',
1020
- source: '/',
1021
- target: '/ithome/win10',
1022
- },
1023
- ],
1024
- iphone: [
1025
- {
1026
- title: 'iphone 之家',
1027
- docs: 'https://docs.rsshub.app/new-media.html#it-zhi-jia',
1028
- source: '/',
1029
- target: '/ithome/iphone',
1030
- },
1031
- ],
1032
- ipad: [
1033
- {
1034
- title: 'ipad 之家',
1035
- docs: 'https://docs.rsshub.app/new-media.html#it-zhi-jia',
1036
- source: '/',
1037
- target: '/ithome/ipad',
1038
- },
1039
- ],
1040
- android: [
1041
- {
1042
- title: 'android 之家',
1043
- docs: 'https://docs.rsshub.app/new-media.html#it-zhi-jia',
1044
- source: '/',
1045
- target: '/ithome/android',
1046
- },
1047
- ],
1048
- digi: [
1049
- {
1050
- title: '数码之家',
1051
- docs: 'https://docs.rsshub.app/new-media.html#it-zhi-jia',
1052
- source: '/',
1053
- target: '/ithome/digi',
1054
- },
1055
- ],
1056
- next: [
1057
- {
1058
- title: '智能时代',
1059
- docs: 'https://docs.rsshub.app/new-media.html#it-zhi-jia',
1060
- source: '/',
1061
- target: '/ithome/next',
1062
- },
1063
- ],
1064
- },
1065
-
1066
978
  'govopendata.com': {
1067
979
  _name: '新闻联播文字版',
1068
980
  cn: [
@@ -1304,74 +1216,33 @@ module.exports = {
1304
1216
  },
1305
1217
  ],
1306
1218
  },
1307
- 'javlibrary.com': {
1308
- _name: 'javlibrary',
1309
- www: [
1310
- {
1311
- title: '新话题',
1312
- docs: 'https://docs.rsshub.app/multimedia.html#javlibrary',
1313
- source: '/cn',
1314
- target: '/javlibrary/videos/update',
1315
- },
1316
- {
1317
- title: '新发行',
1318
- docs: 'https://docs.rsshub.app/multimedia.html#javlibrary',
1319
- source: '/cn',
1320
- target: '/javlibrary/videos/newrelease',
1321
- },
1322
- {
1323
- title: '新加入',
1324
- docs: 'https://docs.rsshub.app/multimedia.html#javlibrary',
1325
- source: '/cn',
1326
- target: '/javlibrary/videos/newentries',
1327
- },
1328
- {
1329
- title: '最想要',
1330
- docs: 'https://docs.rsshub.app/multimedia.html#javlibrary',
1331
- source: '/cn',
1332
- target: '/javlibrary/videos/mostwanted',
1333
- },
1334
- {
1335
- title: '高评价',
1336
- docs: 'https://docs.rsshub.app/multimedia.html#javlibrary',
1337
- source: '/cn',
1338
- target: '/javlibrary/videos/bestrated',
1339
- },
1340
- {
1341
- title: '最佳评论',
1342
- docs: 'https://docs.rsshub.app/multimedia.html#javlibrary',
1343
- source: '/cn',
1344
- target: '/javlibrary/bestreviews',
1345
- },
1346
- {
1347
- title: '影星',
1348
- docs: 'https://docs.rsshub.app/multimedia.html#javlibrary',
1349
- source: '/cn/vl_star.php',
1350
- target: (params, url) => `/javlibrary/stars/${new URL(url).searchParams.get('s')}`,
1351
- },
1352
- {
1353
- title: '用户文章',
1354
- docs: 'https://docs.rsshub.app/multimedia.html#javlibrary',
1355
- source: ['/cn/user.php', '/cn/userposts.php', '/cn/userwateched.php', '/cn/userowned.php', '/cn/userwanted.php'],
1356
- target: (params, url) => `/javlibrary/users/${new URL(url).searchParams.get('u')}/userposts`,
1357
- },
1219
+ 'google.com': {
1220
+ _name: '谷歌',
1221
+ chrome: [
1358
1222
  {
1359
- title: '用户拥有',
1360
- docs: 'https://docs.rsshub.app/multimedia.html#javlibrary',
1361
- source: ['/cn/user.php', '/cn/userposts.php', '/cn/userwateched.php', '/cn/userowned.php', '/cn/userwanted.php'],
1362
- target: (params, url) => `/javlibrary/users/${new URL(url).searchParams.get('u')}/userowned`,
1223
+ title: '插件更新',
1224
+ source: '/webstore/detail/:name/:id',
1225
+ docs: 'https://docs.rsshub.app/program-update.html#chrome-wang-shang-ying-yong-dian',
1226
+ target: '/chrome/webstore/extensions/:id',
1363
1227
  },
1228
+ ],
1229
+ photos: [
1364
1230
  {
1365
- title: '用户看过',
1366
- docs: 'https://docs.rsshub.app/multimedia.html#javlibrary',
1367
- source: ['/cn/user.php', '/cn/userposts.php', '/cn/userwateched.php', '/cn/userowned.php', '/cn/userwanted.php'],
1368
- target: (params, url) => `/javlibrary/users/${new URL(url).searchParams.get('u')}/userwatched`,
1231
+ title: '相册',
1232
+ docs: 'https://docs.rsshub.app/picture.html#google-xiang-ce',
1233
+ source: '/share/*',
1234
+ target: (params, url, document) => {
1235
+ const id = document && document.querySelector('html').innerHTML.match(/photos.app.goo.gl\/(.*?)"/)[1];
1236
+ return id ? `/google/album/${id}` : '';
1237
+ },
1369
1238
  },
1239
+ ],
1240
+ sites: [
1370
1241
  {
1371
- title: '用户想要',
1372
- docs: 'https://docs.rsshub.app/multimedia.html#javlibrary',
1373
- source: ['/cn/user.php', '/cn/userposts.php', '/cn/userwateched.php', '/cn/userowned.php', '/cn/userwanted.php'],
1374
- target: (params, url) => `/javlibrary/users/${new URL(url).searchParams.get('u')}/userwanted`,
1242
+ title: 'Sites',
1243
+ docs: 'https://docs.rsshub.app/blog.html#google-sites',
1244
+ source: ['/site/:id/*', '/site/:id'],
1245
+ target: '/google/sites/:id',
1375
1246
  },
1376
1247
  ],
1377
1248
  },
package/lib/router.js CHANGED
@@ -995,9 +995,6 @@ router.get('/xidian/jwc/:category?', lazyloadRouteHandler('./routes/universities
995
995
  // Westore
996
996
  router.get('/westore/new', lazyloadRouteHandler('./routes/westore/new'));
997
997
 
998
- // 优酷
999
- router.get('/youku/channel/:channelId/:embed?', lazyloadRouteHandler('./routes/youku/channel'));
1000
-
1001
998
  // 油价
1002
999
  router.get('/oilprice/:area', lazyloadRouteHandler('./routes/oilprice'));
1003
1000
 
@@ -1425,9 +1422,6 @@ router.get('/ui-cn/user/:id', lazyloadRouteHandler('./routes/ui-cn/user'));
1425
1422
  // Dcard
1426
1423
  router.get('/dcard/:section/:type?', lazyloadRouteHandler('./routes/dcard/section'));
1427
1424
 
1428
- // 12306
1429
- router.get('/12306/zxdt/:id?', lazyloadRouteHandler('./routes/12306/zxdt'));
1430
-
1431
1425
  // 北京天文馆每日一图
1432
1426
  router.get('/bjp/apod', lazyloadRouteHandler('./routes/bjp/apod'));
1433
1427
 
@@ -1549,9 +1543,6 @@ router.get('/infoq/topic/:id', lazyloadRouteHandler('./routes/infoq/topic'));
1549
1543
  // checkee
1550
1544
  router.get('/checkee/:dispdate', lazyloadRouteHandler('./routes/checkee/index'));
1551
1545
 
1552
- // 艾瑞
1553
- router.get('/iresearch/report', lazyloadRouteHandler('./routes/iresearch/report'));
1554
-
1555
1546
  // ZAKER migrated to v2
1556
1547
  // router.get('/zaker/:type/:id', lazyloadRouteHandler('./routes/zaker/source'));
1557
1548
  // router.get('/zaker/focusread', lazyloadRouteHandler('./routes/zaker/focusread'));
@@ -1774,7 +1765,7 @@ router.get('/gov/veterans/hebei/:type', lazyloadRouteHandler('./routes/gov/veter
1774
1765
  router.get('/dilbert/strip', lazyloadRouteHandler('./routes/dilbert/strip'));
1775
1766
 
1776
1767
  // 游戏打折情报
1777
- router.get('/yxdzqb/:type', lazyloadRouteHandler('./routes/yxdzqb'));
1768
+ // router.get('/yxdzqb/:type', lazyloadRouteHandler('./routes/yxdzqb'));
1778
1769
 
1779
1770
  // 怪物猎人
1780
1771
  router.get('/monsterhunter/update', lazyloadRouteHandler('./routes/mhw/update'));
@@ -1963,8 +1954,8 @@ router.get('/yidoutang/case/:type', lazyloadRouteHandler('./routes/yidoutang/cas
1963
1954
  router.get('/kaiyan/index', lazyloadRouteHandler('./routes/kaiyan/index'));
1964
1955
 
1965
1956
  // 龙空
1966
- router.get('/lkong/forum/:id/:digest?', lazyloadRouteHandler('./routes/lkong/forum'));
1967
- router.get('/lkong/thread/:id', lazyloadRouteHandler('./routes/lkong/thread'));
1957
+ // router.get('/lkong/forum/:id/:digest?', lazyloadRouteHandler('./routes/lkong/forum'));
1958
+ // router.get('/lkong/thread/:id', lazyloadRouteHandler('./routes/lkong/thread'));
1968
1959
  // router.get('/lkong/user/:id', lazyloadRouteHandler('./routes/lkong/user'));
1969
1960
 
1970
1961
  // 坂道系列资讯
@@ -2066,8 +2057,7 @@ router.get('/weidian/goods/:id', lazyloadRouteHandler('./routes/weidian/goods'))
2066
2057
 
2067
2058
  // 有赞
2068
2059
  router.get('/youzan/goods/:id', lazyloadRouteHandler('./routes/youzan/goods'));
2069
- // 有知有行
2070
- router.get('/youzhiyouxing/materials', lazyloadRouteHandler('./routes/youzhiyouxing/materials'));
2060
+
2071
2061
  // 币世界快讯
2072
2062
  router.get('/bishijie/kuaixun', lazyloadRouteHandler('./routes/bishijie/kuaixun'));
2073
2063
 
@@ -2176,7 +2166,7 @@ router.get('/reuters/channel/:site/:channel', lazyloadRouteHandler('./routes/reu
2176
2166
  router.get('/pgyer/:app?', lazyloadRouteHandler('./routes/pgyer/app'));
2177
2167
 
2178
2168
  // 微博个人时间线
2179
- router.get('/weibo/timeline/:uid/:feature?', lazyloadRouteHandler('./routes/weibo/timeline'));
2169
+ router.get('/weibo/timeline/:uid/:feature?/:routeParams?', lazyloadRouteHandler('./routes/weibo/timeline'));
2180
2170
 
2181
2171
  // TAPTAP
2182
2172
  router.get('/taptap/topic/:id/:label?', lazyloadRouteHandler('./routes/taptap/topic'));
@@ -2363,10 +2353,6 @@ router.get('/nyaa/search/:query?', lazyloadRouteHandler('./routes/nyaa/search'))
2363
2353
  // 片源网
2364
2354
  router.get('/pianyuan/:media?', lazyloadRouteHandler('./routes/pianyuan/app'));
2365
2355
 
2366
- // ITHome
2367
- router.get('/ithome/:caty', lazyloadRouteHandler('./routes/ithome/index'));
2368
- router.get('/ithome/ranking/:type', lazyloadRouteHandler('./routes/ithome/ranking'));
2369
-
2370
2356
  // 巴哈姆特
2371
2357
  router.get('/bahamut/creation/:author/:category?', lazyloadRouteHandler('./routes/bahamut/creation'));
2372
2358
  router.get('/bahamut/creation_index/:category?/:subcategory?/:type?', lazyloadRouteHandler('./routes/bahamut/creation_index'));
@@ -2402,9 +2388,6 @@ router.get('/blogs/paulgraham', lazyloadRouteHandler('./routes/blogs/paulgraham'
2402
2388
  // invisionapp
2403
2389
  router.get('/invisionapp/inside-design', lazyloadRouteHandler('./routes/invisionapp/inside-design'));
2404
2390
 
2405
- // producthunt
2406
- router.get('/producthunt/today', lazyloadRouteHandler('./routes/producthunt/today'));
2407
-
2408
2391
  // mlog.club
2409
2392
  router.get('/mlog-club/topics/:node', lazyloadRouteHandler('./routes/mlog-club/topics'));
2410
2393
  router.get('/mlog-club/projects', lazyloadRouteHandler('./routes/mlog-club/projects'));
@@ -2491,7 +2474,7 @@ router.get('/weixin/miniprogram/framework', lazyloadRouteHandler('./routes/tence
2491
2474
  router.get('/weixin/miniprogram/devtools', lazyloadRouteHandler('./routes/tencent/wechat/miniprogram/devtools')); // 开发者工具更新日志
2492
2475
  router.get('/weixin/miniprogram/wxcloud/:caty?', lazyloadRouteHandler('./routes/tencent/wechat/miniprogram/wxcloud')); // 云开发更新日志
2493
2476
 
2494
- // 武汉肺炎疫情动态
2477
+ // 新冠肺炎疫情动态
2495
2478
  router.get('/coronavirus/caixin', lazyloadRouteHandler('./routes/coronavirus/caixin'));
2496
2479
  router.get('/coronavirus/dxy/data/:province?/:city?', lazyloadRouteHandler('./routes/coronavirus/dxy-data'));
2497
2480
  router.get('/coronavirus/dxy', lazyloadRouteHandler('./routes/coronavirus/dxy'));
@@ -2520,10 +2503,10 @@ router.get('/letterboxd/user/diary/:username', lazyloadRouteHandler('./routes/le
2520
2503
  router.get('/letterboxd/user/followingdiary/:username', lazyloadRouteHandler('./routes/letterboxd/followingdiary'));
2521
2504
 
2522
2505
  // javlibrary
2523
- router.get('/javlibrary/users/:uid/:utype', lazyloadRouteHandler('./routes/javlibrary/users'));
2524
- router.get('/javlibrary/videos/:vtype', lazyloadRouteHandler('./routes/javlibrary/videos'));
2525
- router.get('/javlibrary/stars/:sid', lazyloadRouteHandler('./routes/javlibrary/stars'));
2526
- router.get('/javlibrary/bestreviews', lazyloadRouteHandler('./routes/javlibrary/bestreviews'));
2506
+ // router.get('/javlibrary/users/:uid/:utype', lazyloadRouteHandler('./routes/javlibrary/users'));
2507
+ // router.get('/javlibrary/videos/:vtype', lazyloadRouteHandler('./routes/javlibrary/videos'));
2508
+ // router.get('/javlibrary/stars/:sid', lazyloadRouteHandler('./routes/javlibrary/stars'));
2509
+ // router.get('/javlibrary/bestreviews', lazyloadRouteHandler('./routes/javlibrary/bestreviews'));
2527
2510
 
2528
2511
  // Last.FM
2529
2512
  router.get('/lastfm/recent/:user', lazyloadRouteHandler('./routes/lastfm/recent'));
@@ -2765,9 +2748,6 @@ router.get('/adnmb/:pid', lazyloadRouteHandler('./routes/adnmb/index'));
2765
2748
  // MIT科技评论
2766
2749
  router.get('/mittrchina/:type', lazyloadRouteHandler('./routes/mittrchina'));
2767
2750
 
2768
- // 消费者报道
2769
- router.get('/ccreports/article', lazyloadRouteHandler('./routes/ccreports'));
2770
-
2771
2751
  // iYouPort
2772
2752
  router.get('/iyouport/article', lazyloadRouteHandler('./routes/iyouport'));
2773
2753
  router.get('/iyouport/:category?', lazyloadRouteHandler('./routes/iyouport'));
@@ -3426,9 +3406,9 @@ router.get('/allnow/user/:id', lazyloadRouteHandler('./routes/allnow/user'));
3426
3406
  router.get('/allnow', lazyloadRouteHandler('./routes/allnow/index'));
3427
3407
 
3428
3408
  // 证券时报网
3429
- router.get('/stcn/news/:id?', lazyloadRouteHandler('./routes/stcn/news'));
3430
- router.get('/stcn/data/:id?', lazyloadRouteHandler('./routes/stcn/data'));
3431
- router.get('/stcn/kuaixun/:id?', lazyloadRouteHandler('./routes/stcn/kuaixun'));
3409
+ // router.get('/stcn/news/:id?', lazyloadRouteHandler('./routes/stcn/news'));
3410
+ // router.get('/stcn/data/:id?', lazyloadRouteHandler('./routes/stcn/data'));
3411
+ // router.get('/stcn/kuaixun/:id?', lazyloadRouteHandler('./routes/stcn/kuaixun'));
3432
3412
 
3433
3413
  // dev.to
3434
3414
  router.get('/dev.to/top/:period', lazyloadRouteHandler('./routes/dev.to/top'));
@@ -3473,9 +3453,6 @@ router.get('/chinafile/:category?', lazyloadRouteHandler('./routes/chinafile/ind
3473
3453
  // 科技島讀
3474
3454
  router.get('/daodu/:caty?', lazyloadRouteHandler('./routes/daodu/index'));
3475
3455
 
3476
- // CNTV
3477
- router.get('/cntv/:column', lazyloadRouteHandler('./routes/cntv/cntv'));
3478
-
3479
3456
  // Grand-Challenge
3480
3457
  router.get('/grandchallenge/user/:id', lazyloadRouteHandler('./routes/grandchallenge/user'));
3481
3458
  router.get('/grandchallenge/challenges', lazyloadRouteHandler('./routes/grandchallenge/challenges'));
@@ -3904,7 +3881,7 @@ router.get('/sznews/ranking', lazyloadRouteHandler('./routes/sznews/ranking'));
3904
3881
  router.get('/shuax/project/:name?', lazyloadRouteHandler('./routes/shuax/project'));
3905
3882
 
3906
3883
  // BioOne
3907
- router.get('/bioone/featured', lazyloadRouteHandler('./routes/bioone/featured'));
3884
+ // router.get('/bioone/featured', lazyloadRouteHandler('./routes/bioone/featured'));
3908
3885
 
3909
3886
  // Obsidian
3910
3887
  router.get('/obsidian/announcements', lazyloadRouteHandler('./routes/obsidian/announcements'));
@@ -4005,8 +3982,8 @@ router.get('/liyuan-forums/threads/user/:user_id', lazyloadRouteHandler('./route
4005
3982
  // router.get('/jisilu/reply/:user', lazyloadRouteHandler('./routes/jisilu/reply'));
4006
3983
  // router.get('/jisilu/topic/:user', lazyloadRouteHandler('./routes/jisilu/topic'));
4007
3984
 
4008
- // Constitutional Court of Baden-Württemberg (Germany)
4009
- router.get('/verfghbw/press/:keyword?', lazyloadRouteHandler('./routes/verfghbw/press'));
3985
+ // Constitutional Court of Baden-Württemberg (Germany) migrated to v2
3986
+ // router.get('/verfghbw/press/:keyword?', lazyloadRouteHandler('./routes/verfghbw/press'));
4010
3987
 
4011
3988
  // Topbook
4012
3989
  router.get('/topbook/overview/:id?', lazyloadRouteHandler('./routes/topbook/overview'));
@@ -59,10 +59,16 @@ module.exports = async (ctx) => {
59
59
  `.trim(),
60
60
  });
61
61
 
62
+ let itemsLen = chapterArray.length;
63
+
64
+ if (chapterCnt > 0) {
65
+ itemsLen = chapterCnt;
66
+ }
67
+
62
68
  ctx.state.data = {
63
69
  title: `拷贝漫画 - ${bookTitle}`,
64
70
  link: `https://copymanga.com/comic/${id}`,
65
71
  description: bookIntro,
66
- item: chapterArray.map(genResult).slice(0, chapterCnt),
72
+ item: chapterArray.map(genResult).slice(0, itemsLen),
67
73
  };
68
74
  };
@@ -5,7 +5,7 @@ module.exports = async (ctx) => {
5
5
  const PROVINCE = ctx.params.province || '国内';
6
6
  let CITY = ctx.params.city || '';
7
7
 
8
- const link = 'https://3g.dxy.cn/newh5/view/pneumonia';
8
+ const link = 'https://ncov.dxy.cn/ncovh5/view/pneumonia';
9
9
 
10
10
  const response = await got({
11
11
  method: 'get',
@@ -4,7 +4,7 @@ const { JSDOM } = require('jsdom');
4
4
  module.exports = async (ctx) => {
5
5
  const response = await got({
6
6
  method: 'get',
7
- url: 'https://3g.dxy.cn/newh5/view/pneumonia',
7
+ url: 'https://ncov.dxy.cn/ncovh5/view/pneumonia',
8
8
  });
9
9
 
10
10
  const dom = new JSDOM(response.data, {
@@ -15,7 +15,7 @@ module.exports = async (ctx) => {
15
15
 
16
16
  ctx.state.data = {
17
17
  title: '全球新型肺炎疫情实时播报-丁香园',
18
- link: 'https://3g.dxy.cn/newh5/view/pneumonia',
18
+ link: 'https://ncov.dxy.cn/ncovh5/view/pneumonia',
19
19
  item: data.map((item) => ({
20
20
  title: item.title,
21
21
  description: item.summary,
@@ -1,24 +1,69 @@
1
1
  const got = require('@/utils/got');
2
+ const { parseDate } = require('@/utils/parse-date');
3
+ const { art } = require('@/utils/render');
4
+ const path = require('path');
2
5
 
3
6
  module.exports = async (ctx) => {
4
7
  const id = ctx.params.id;
5
8
 
6
- const response = await got({
7
- method: 'post',
8
- url: 'http://music.163.com/api/dj/program/byradio',
9
- headers: {
10
- Referer: 'https://music.163.com/',
11
- },
12
- form: {
13
- radioId: id,
14
- limit: 1000,
15
- offset: 0,
16
- },
17
- });
9
+ const ProcessFeed = async (limit, offset) =>
10
+ await got({
11
+ method: 'post',
12
+ url: 'https://music.163.com/api/dj/program/byradio',
13
+ headers: {
14
+ Referer: 'https://music.163.com/',
15
+ },
16
+ form: {
17
+ radioId: id,
18
+ limit,
19
+ offset,
20
+ },
21
+ });
18
22
 
19
- const programs = response.data.programs || [];
23
+ const response = await ProcessFeed(1, 0);
20
24
 
25
+ const programs = response.data.programs || [];
21
26
  const { radio, dj } = programs[0] || { radio: {}, dj: {} };
27
+ const count = response.data.count || 0;
28
+
29
+ const countPage = [];
30
+ for (let i = 0; i < Math.ceil(count / 500); i++) {
31
+ countPage.push(i);
32
+ }
33
+
34
+ const items = await Promise.all(
35
+ countPage.map(async (item) => {
36
+ const response = await ProcessFeed(500, item * 500);
37
+ const programs = response.data.programs || [];
38
+ const list = programs.map((pg) => {
39
+ const description = (pg.description || '').split('\n').map((p) => p);
40
+ const duration = ~~(pg.duration / 1000);
41
+ const itunes_duration = `${(duration / 60).toFixed(0).padStart(2, '0')}:${(duration % 60).toFixed(0).padStart(2, '0')}`;
42
+
43
+ const html = art(path.join(__dirname, 'templates/djradio-content.art'), {
44
+ pg,
45
+ description,
46
+ itunes_duration,
47
+ });
48
+
49
+ return {
50
+ title: pg.name,
51
+ link: 'https://music.163.com/program/' + pg.id,
52
+ pubDate: parseDate(pg.createTime),
53
+ published: parseDate(pg.createTime),
54
+ author: pg.dj.nickname,
55
+ description: html,
56
+ content: { html },
57
+ itunes_item_image: pg.coverUrl,
58
+ enclosure_url: `https://music.163.com/song/media/outer/url?id=${pg.mainTrackId}.mp3`,
59
+ enclosure_length: duration,
60
+ enclosure_type: 'audio/mpeg',
61
+ itunes_duration,
62
+ };
63
+ });
64
+ return list;
65
+ })
66
+ );
22
67
 
23
68
  ctx.state.data = {
24
69
  title: radio.name,
@@ -31,36 +76,6 @@ module.exports = async (ctx) => {
31
76
  image: radio.picUrl,
32
77
  itunes_author: dj.nickname,
33
78
  itunes_category: radio.category,
34
- item: programs.map((pg) => {
35
- const image = `<img src=${pg.coverUrl} />`;
36
-
37
- const description = `<div>${(pg.description || '')
38
- .split('\n')
39
- .map((p) => `<p>${p}</p>`)
40
- .join('')}</div>`;
41
-
42
- const src = `https://music.163.com/program/${pg.id}`;
43
-
44
- const duration = ~~(pg.duration / 1000);
45
- const itunes_duration = `${(duration / 60).toFixed(0).padStart(2, '0')}:${(duration % 60).toFixed(0).padStart(2, '0')}`;
46
-
47
- const html =
48
- image + description + `<div><audio src="http://music.163.com/song/media/outer/url?id=${pg.mainTrackId}.mp3" controls="controls"></audio><p>时长: ${itunes_duration}</p><p><a href="${src}">查看节目</a></p></div>`;
49
-
50
- return {
51
- title: pg.name,
52
- link: src,
53
- pubDate: new Date(pg.createTime).toUTCString(),
54
- published: new Date(pg.createTime).toISOString(),
55
- author: pg.dj.nickname,
56
- description: html,
57
- content: { html },
58
- itunes_item_image: pg.coverUrl,
59
- enclosure_url: `http://music.163.com/song/media/outer/url?id=${pg.mainTrackId}.mp3`,
60
- enclosure_length: duration,
61
- enclosure_type: 'audio/mpeg',
62
- itunes_duration,
63
- };
64
- }),
79
+ item: items.flat(),
65
80
  };
66
81
  };
@@ -0,0 +1,11 @@
1
+ <img src={{pg.coverUrl}} />
2
+ <div>
3
+ {{each description}}
4
+ <p>{{$value}}</p>
5
+ {{/each}}
6
+ </div>
7
+ <div>
8
+ <audio src="https://music.163.com/song/media/outer/url?id={{pg.mainTrackId}}.mp3" controls="controls"></audio>
9
+ <p>时长: {{itunes_duration}}</p>
10
+ <p><a href="https://music.163.com/program/{{pg.id}}">查看节目</a></p>
11
+ </div>
@@ -37,14 +37,15 @@ module.exports = async (ctx) => {
37
37
  const data = response.data;
38
38
 
39
39
  const $ = cheerio.load(data);
40
+ const page = $('.page').get();
40
41
  const item = $('.routeBlock').get();
41
- return Promise.resolve({ item, type });
42
+ return { page, item, type };
42
43
  })
43
44
  );
44
45
  const list = [];
45
- all.forEach(({ item, type }) => {
46
+ all.forEach(({ page, item, type }) => {
46
47
  item.forEach((item) => {
47
- list.push({ item, type });
48
+ list.push({ page, item, type });
48
49
  });
49
50
  });
50
51
 
@@ -52,9 +53,9 @@ module.exports = async (ctx) => {
52
53
  title: 'RSSHub 有新路由啦',
53
54
  link: 'https://docs.rsshub.app',
54
55
  description: '万物皆可 RSS',
55
- item: list.map(({ item, type }) => {
56
- item = cheerio(item);
57
- item.find('.header-anchor').remove();
56
+ item: list.map(({ page, item, type }) => {
57
+ const $ = cheerio.load(page);
58
+ item = $(item);
58
59
  const titleEle = item.prevAll('h2').eq(0);
59
60
  return {
60
61
  title: `${titleEle.text().slice(2)} - ${item.prevAll('h3').eq(0).text().slice(2)}`,
@@ -87,6 +87,9 @@ module.exports = async (ctx) => {
87
87
  }
88
88
  }
89
89
 
90
+ // 修复文字格式错误
91
+ single.description = single.description.replace(/<section(.*?)>/g, '<p $1/>');
92
+
90
93
  return single;
91
94
  })
92
95
  .get()