rsshub 1.0.0-master.d2b1df9 → 1.0.0-master.d2bf7b3

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 (122) hide show
  1. package/lib/config.js +3 -0
  2. package/lib/middleware/cache/index.js +3 -0
  3. package/lib/router.js +5 -5
  4. package/lib/v2/bangumi/maintainer.js +1 -0
  5. package/lib/v2/bangumi/online.js +26 -0
  6. package/lib/v2/bangumi/radar.js +13 -2
  7. package/lib/v2/bangumi/router.js +1 -0
  8. package/lib/v2/bangumi/templates/image.art +1 -0
  9. package/lib/v2/bilibili/collection.js +34 -0
  10. package/lib/v2/bilibili/maintainer.js +1 -0
  11. package/lib/v2/bilibili/radar.js +9 -0
  12. package/lib/v2/bilibili/router.js +1 -0
  13. package/lib/v2/china/maintainer.js +4 -0
  14. package/lib/v2/china/news/highlights/news.js +40 -0
  15. package/lib/v2/china/news/military/news.js +31 -0
  16. package/lib/v2/china/radar.js +21 -0
  17. package/lib/v2/china/router.js +4 -0
  18. package/lib/v2/csdn/blog.js +39 -0
  19. package/lib/v2/csdn/maintainer.js +3 -0
  20. package/lib/v2/csdn/radar.js +13 -0
  21. package/lib/v2/csdn/router.js +3 -0
  22. package/lib/v2/douyu/post.js +9 -2
  23. package/lib/v2/github/comments.js +3 -4
  24. package/lib/v2/hupu/bbs.js +23 -23
  25. package/lib/v2/huxiu/maintainer.js +1 -0
  26. package/lib/v2/huxiu/moment.js +40 -0
  27. package/lib/v2/huxiu/radar.js +6 -0
  28. package/lib/v2/huxiu/router.js +1 -0
  29. package/lib/v2/huxiu/templates/moment.art +16 -0
  30. package/lib/v2/iwara/maintainer.js +1 -0
  31. package/lib/v2/iwara/radar.js +6 -0
  32. package/lib/v2/iwara/router.js +1 -0
  33. package/lib/v2/iwara/subscriptions.js +49 -0
  34. package/lib/v2/iwara/templates/subscriptions.art +1 -0
  35. package/lib/v2/leetcode/dailyquestion-solution-cn.js +183 -0
  36. package/lib/v2/leetcode/dailyquestion-solution-en.js +213 -0
  37. package/lib/v2/leetcode/maintainer.js +1 -0
  38. package/lib/v2/leetcode/radar.js +12 -0
  39. package/lib/v2/leetcode/router.js +2 -0
  40. package/lib/v2/lovelive-anime/maintainer.js +3 -0
  41. package/lib/v2/lovelive-anime/news.js +56 -0
  42. package/lib/v2/lovelive-anime/radar.js +13 -0
  43. package/lib/v2/lovelive-anime/router.js +3 -0
  44. package/lib/v2/lovelive-anime/templates/description.art +1 -0
  45. package/lib/v2/macfilos/blog.js +61 -0
  46. package/lib/v2/macfilos/maintainer.js +3 -0
  47. package/lib/v2/macfilos/radar.js +13 -0
  48. package/lib/v2/macfilos/router.js +3 -0
  49. package/lib/v2/meteor/boards.js +11 -0
  50. package/lib/v2/meteor/index.js +45 -0
  51. package/lib/v2/meteor/maintainer.js +4 -0
  52. package/lib/v2/meteor/radar.js +19 -0
  53. package/lib/v2/meteor/router.js +4 -0
  54. package/lib/v2/meteor/templates/desc.art +7 -0
  55. package/lib/v2/meteor/utils.js +90 -0
  56. package/lib/v2/nikkei-cn/index.js +4 -1
  57. package/lib/v2/nua/gra.js +56 -0
  58. package/lib/v2/nua/maintainer.js +3 -0
  59. package/lib/v2/nua/radar.js +13 -0
  60. package/lib/v2/nua/router.js +3 -0
  61. package/lib/v2/oschina/maintainer.js +6 -0
  62. package/lib/{routes → v2}/oschina/news.js +35 -39
  63. package/lib/v2/oschina/radar.js +33 -0
  64. package/lib/v2/oschina/router.js +6 -0
  65. package/lib/v2/oschina/topic.js +53 -0
  66. package/lib/v2/oschina/user.js +50 -0
  67. package/lib/v2/plurk/anonymous.js +23 -0
  68. package/lib/v2/plurk/hotlinks.js +20 -0
  69. package/lib/v2/plurk/maintainer.js +9 -0
  70. package/lib/v2/plurk/news.js +23 -0
  71. package/lib/v2/plurk/radar.js +56 -0
  72. package/lib/v2/plurk/router.js +9 -0
  73. package/lib/v2/plurk/search.js +27 -0
  74. package/lib/v2/plurk/top.js +29 -0
  75. package/lib/v2/plurk/topic.js +33 -0
  76. package/lib/v2/plurk/user.js +31 -0
  77. package/lib/v2/plurk/utils.js +56 -0
  78. package/lib/v2/segmentfault/blogs.js +38 -0
  79. package/lib/v2/segmentfault/maintainer.js +1 -0
  80. package/lib/v2/segmentfault/radar.js +8 -2
  81. package/lib/v2/segmentfault/router.js +1 -0
  82. package/lib/v2/sensortower/blog.js +69 -0
  83. package/lib/v2/sensortower/maintainer.js +3 -0
  84. package/lib/v2/sensortower/radar.js +13 -0
  85. package/lib/v2/sensortower/router.js +3 -0
  86. package/lib/v2/sensortower/templates/description.art +9 -0
  87. package/lib/v2/taptap/templates/imagePost.art +3 -0
  88. package/lib/v2/taptap/templates/videoPost.art +2 -1
  89. package/lib/v2/taptap/topic.js +33 -27
  90. package/lib/v2/taptap/utils.js +13 -8
  91. package/lib/v2/test/index.js +15 -0
  92. package/lib/v2/trending/allTrending.js +46 -19
  93. package/lib/v2/trending/templates/content.art +1 -0
  94. package/lib/v2/twitter/maintainer.js +1 -1
  95. package/lib/v2/twitter/router.js +1 -1
  96. package/lib/v2/twitter/web-api/twitter-api.js +1 -0
  97. package/lib/v2/warthunder/maintainer.js +3 -0
  98. package/lib/v2/warthunder/news.js +49 -0
  99. package/lib/v2/warthunder/radar.js +13 -0
  100. package/lib/v2/warthunder/router.js +3 -0
  101. package/lib/v2/warthunder/templates/description.art +1 -0
  102. package/lib/v2/xyzrank/index.js +111 -0
  103. package/lib/v2/xyzrank/maintainer.js +6 -0
  104. package/lib/v2/xyzrank/radar.js +31 -0
  105. package/lib/v2/xyzrank/router.js +3 -0
  106. package/lib/v2/xyzrank/templates/description.art +12 -0
  107. package/lib/v2/zaobao/util.js +6 -6
  108. package/lib/v2/zuvio/boards.js +14 -0
  109. package/lib/v2/zuvio/radar.js +13 -0
  110. package/lib/v2/zuvio/router.js +4 -0
  111. package/lib/v2/zuvio/student5.js +58 -0
  112. package/lib/v2/zuvio/templates/img.art +2 -0
  113. package/lib/v2/zuvio/templates/link.art +7 -0
  114. package/lib/v2/zuvio/templates/ref_article.art +8 -0
  115. package/lib/v2/zuvio/templates/rss.art +1 -0
  116. package/lib/v2/zuvio/templates/youtube.art +2 -0
  117. package/lib/v2/zuvio/utils.js +61 -0
  118. package/package.json +14 -15
  119. package/lib/routes/oschina/topic.js +0 -54
  120. package/lib/routes/oschina/u.js +0 -57
  121. package/lib/routes/oschina/user.js +0 -57
  122. package/lib/v2/hupu/templates/description.art +0 -6
@@ -1,57 +0,0 @@
1
- const got = require('@/utils/got');
2
- const cheerio = require('cheerio');
3
-
4
- module.exports = async (ctx) => {
5
- const id = ctx.params.id;
6
- const res = await got({
7
- method: 'get',
8
- url: `https://my.oschina.net/${id}`,
9
- headers: {
10
- Referer: `https://my.oschina.net/${id}`,
11
- },
12
- });
13
- const $ = cheerio.load(res.data);
14
- $('div[data-tooltip]').remove();
15
- const author = $('[data-user-name]').attr('data-user-name');
16
- const list = $('#newestBlogList').find('.blog-item');
17
- const count = [];
18
- for (let i = 0; i < Math.min(list.length, 10); i++) {
19
- count.push(i);
20
- }
21
- const resultItem = await Promise.all(
22
- count.map(async (i) => {
23
- const each = $(list[i]);
24
- const originalUrl = each.find('a.header', '.content').attr('href');
25
- const item = {
26
- title: each.find('a.header', '.content').text(),
27
- description: each.find('p', '.description').text(),
28
- link: encodeURI(originalUrl),
29
- };
30
- const key = 'oschina' + item.link;
31
- const value = await ctx.cache.get(key);
32
-
33
- if (value) {
34
- item.description = value;
35
- } else {
36
- const detail = await got({
37
- method: 'get',
38
- url: item.link,
39
- headers: {
40
- Referer: item.link,
41
- },
42
- });
43
- const content = cheerio.load(detail.data);
44
- content('.ad-wrap').remove();
45
- item.description = content('.article-detail').html();
46
- ctx.cache.set(key, item.description);
47
- }
48
- return item;
49
- })
50
- );
51
-
52
- ctx.state.data = {
53
- title: author + '的博客',
54
- link: `https://my.oschina.net/${id}`,
55
- item: resultItem,
56
- };
57
- };
@@ -1,6 +0,0 @@
1
- {{ if videos }}
2
- {{ each videos video}}
3
- <video><source src="{{ video }}" type="video/mp4"></video>
4
- {{/each}}
5
- {{ /if }}
6
- {{@ description }}