rsshub 1.0.0-master.c183692 → 1.0.0-master.c1913c8

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 (103) hide show
  1. package/README.md +6 -9
  2. package/lib/config.ts +18 -0
  3. package/lib/errors/index.tsx +1 -1
  4. package/lib/middleware/logger.ts +2 -2
  5. package/lib/routes/abc/index.ts +2 -2
  6. package/lib/routes/apnews/api.ts +6 -1
  7. package/lib/routes/apnews/rss.ts +1 -1
  8. package/lib/routes/apnews/sitemap.ts +2 -1
  9. package/lib/routes/apnews/topics.ts +2 -2
  10. package/lib/routes/asus/bios.ts +39 -6
  11. package/lib/routes/bilibili/bilibili-recommend.ts +42 -0
  12. package/lib/routes/bilibili/cache.ts +22 -0
  13. package/lib/routes/bilibili/dynamic.ts +101 -97
  14. package/lib/routes/bilibili/followings-video.ts +9 -3
  15. package/lib/routes/bilibili/utils.ts +5 -0
  16. package/lib/routes/bilibili/video.ts +2 -1
  17. package/lib/routes/bitget/announcement.ts +200 -0
  18. package/lib/routes/bitget/namespace.ts +6 -0
  19. package/lib/routes/bitget/type.ts +26 -0
  20. package/lib/routes/bjp/apod.ts +4 -2
  21. package/lib/routes/bupt/jwc.ts +130 -0
  22. package/lib/routes/ccfa/index.ts +216 -0
  23. package/lib/routes/ccfa/namespace.ts +8 -0
  24. package/lib/routes/ccfa/templates/description.art +7 -0
  25. package/lib/routes/devtrium/namespace.ts +6 -0
  26. package/lib/routes/devtrium/posts.ts +55 -0
  27. package/lib/routes/discourse/official.ts +55 -0
  28. package/lib/routes/dockerhub/utils.ts +4 -3
  29. package/lib/routes/douban/movie/coming.ts +68 -0
  30. package/lib/routes/douban/templates/movie_coming.art +27 -0
  31. package/lib/routes/follow/profile.ts +35 -5
  32. package/lib/routes/github/comments.ts +32 -30
  33. package/lib/routes/gov/cn/namespace.ts +8 -0
  34. package/lib/routes/gov/{news → cn/news}/index.ts +11 -7
  35. package/lib/routes/gov/ndrc/fggz.ts +637 -2
  36. package/lib/routes/gov/ndrc/namespace.ts +8 -0
  37. package/lib/routes/gov/ndrc/xwdt.ts +28 -8
  38. package/lib/routes/gov/ndrc/zfxxgk/articles.ts +73 -0
  39. package/lib/routes/hpoi/all.ts +3 -2
  40. package/lib/routes/hpoi/character.ts +3 -2
  41. package/lib/routes/hpoi/work.ts +3 -2
  42. package/lib/routes/jjwxc/book.ts +18 -14
  43. package/lib/routes/lofter/collection.ts +87 -0
  44. package/lib/routes/malaysiakini/index.ts +179 -0
  45. package/lib/routes/malaysiakini/namespace.ts +11 -0
  46. package/lib/routes/mastodon/acct.ts +4 -3
  47. package/lib/routes/mastodon/timeline-local.ts +3 -2
  48. package/lib/routes/mastodon/timeline-remote.ts +3 -2
  49. package/lib/routes/meishichina/index.ts +1997 -0
  50. package/lib/routes/meishichina/namespace.ts +8 -0
  51. package/lib/routes/oct0pu5/namespace.ts +10 -0
  52. package/lib/routes/oct0pu5/rss.ts +48 -0
  53. package/lib/routes/pconline/focus.ts +143 -0
  54. package/lib/routes/pconline/namespace.ts +10 -0
  55. package/lib/routes/people/index.ts +6 -2
  56. package/lib/routes/pixivision/index.ts +84 -0
  57. package/lib/routes/pixivision/namespace.ts +6 -0
  58. package/lib/routes/pixivision/utils.ts +86 -0
  59. package/lib/routes/pku/bbs/hot.ts +1 -1
  60. package/lib/routes/pornhub/category.ts +3 -2
  61. package/lib/routes/pornhub/model.ts +4 -3
  62. package/lib/routes/pornhub/pornstar.ts +4 -3
  63. package/lib/routes/pornhub/search.ts +3 -2
  64. package/lib/routes/qiche365/namespace.ts +5 -0
  65. package/lib/routes/qiche365/recall.ts +53 -0
  66. package/lib/routes/sdu/{cs.ts → cs/index.ts} +46 -12
  67. package/lib/routes/sdu/namespace.ts +2 -2
  68. package/lib/routes/soundon/namespace.ts +6 -0
  69. package/lib/routes/soundon/podcast.ts +80 -0
  70. package/lib/routes/soundon/types.ts +67 -0
  71. package/lib/routes/swjtu/scai/bks.ts +80 -0
  72. package/lib/routes/telegram/blog.ts +3 -2
  73. package/lib/routes/telegram/stickerpack.ts +3 -2
  74. package/lib/routes/tencent/news/author.ts +2 -1
  75. package/lib/routes/the/index.ts +3 -2
  76. package/lib/routes/theinitium/app.ts +137 -0
  77. package/lib/routes/theinitium/templates/description.art +17 -0
  78. package/lib/routes/threads/index.ts +26 -20
  79. package/lib/routes/tju/cic/index.ts +2 -2
  80. package/lib/routes/tju/news/index.ts +2 -2
  81. package/lib/routes/tju/oaa/index.ts +2 -2
  82. package/lib/routes/twitch/live.ts +3 -2
  83. package/lib/routes/twitch/video.ts +3 -2
  84. package/lib/routes/twitter/api/mobile-api/login.ts +1 -1
  85. package/lib/routes/twitter/api/web-api/constants.ts +15 -14
  86. package/lib/routes/twitter/api/web-api/login.ts +7 -5
  87. package/lib/routes/twitter/api/web-api/utils.ts +1 -2
  88. package/lib/routes/twitter/list.ts +5 -2
  89. package/lib/routes/twitter/tweet.ts +1 -0
  90. package/lib/routes/weibo/namespace.ts +1 -0
  91. package/lib/routes/weibo/oasis/user.ts +1 -1
  92. package/lib/routes/weibo/super-index.ts +23 -11
  93. package/lib/routes/weibo/user.ts +12 -1
  94. package/lib/routes/whu/cs.ts +11 -3
  95. package/lib/routes/whu/gs/index.ts +2 -1
  96. package/lib/routes/whu/news.ts +27 -2
  97. package/lib/routes/withgoogle/explorables.ts +54 -0
  98. package/lib/routes/withgoogle/namespace.ts +6 -0
  99. package/lib/routes/zaobao/util.ts +1 -1
  100. package/lib/routes/zhihu/zhuanlan.ts +8 -7
  101. package/lib/utils/otel/metric.ts +3 -2
  102. package/lib/views/rss.tsx +7 -0
  103. package/package.json +14 -14
@@ -0,0 +1,80 @@
1
+ import { Route, ViewType } from '@/types';
2
+ import { config } from '@/config';
3
+ import cache from '@/utils/cache';
4
+ import ofetch from '@/utils/ofetch';
5
+ import { parseDate } from '@/utils/parse-date';
6
+ import { Podcast, PodcastInfo } from './types';
7
+
8
+ const handler = async (ctx) => {
9
+ const { id } = ctx.req.param();
10
+
11
+ const apiEndpoint = 'https://api.soundon.fm/v2/client';
12
+ const apiToken = 'KilpEMLQeNzxmNBL55u5';
13
+
14
+ const podcastInfo = (await cache.tryGet(`soundon:${id}`, async () => {
15
+ const response = await ofetch(`${apiEndpoint}/podcasts/${id}`, {
16
+ headers: {
17
+ 'api-token': apiToken,
18
+ },
19
+ });
20
+ return response.data.data;
21
+ })) as PodcastInfo;
22
+
23
+ const episodes = (await cache.tryGet(
24
+ `soundon:${id}:episodes`,
25
+ async () => {
26
+ const response = await ofetch(`${apiEndpoint}/podcasts/${id}/episodes`, {
27
+ headers: {
28
+ 'api-token': apiToken,
29
+ },
30
+ });
31
+ return response.data;
32
+ },
33
+ config.cache.routeExpire,
34
+ false
35
+ )) as Podcast[];
36
+
37
+ const items = episodes.map(({ data: item }) => ({
38
+ title: item.title,
39
+ description: item.contentEncoded,
40
+ link: item.url,
41
+ author: item.artistName,
42
+ pubDate: parseDate(item.publishDate),
43
+ itunes_item_image: item.cover,
44
+ enclosure_url: item.audioUrl,
45
+ enclosure_type: item.audioType,
46
+ itunes_duration: item.duration,
47
+ category: item.itunesKeywords,
48
+ }));
49
+
50
+ return {
51
+ title: podcastInfo.title,
52
+ description: podcastInfo.description,
53
+ itunes_author: podcastInfo.artistName,
54
+ itunes_category: podcastInfo.itunesCategories.join(', '),
55
+ itunes_explicit: podcastInfo.explicit,
56
+ image: podcastInfo.cover,
57
+ language: podcastInfo.language,
58
+ link: podcastInfo.url,
59
+ item: items,
60
+ };
61
+ };
62
+
63
+ export const route: Route = {
64
+ path: '/p/:id',
65
+ categories: ['multimedia'],
66
+ example: '/soundon/p/33a68cdc-18ad-4192-84cc-22bd7fdc6a31',
67
+ parameters: { id: 'Podcast ID' },
68
+ features: {
69
+ supportPodcast: true,
70
+ },
71
+ radar: [
72
+ {
73
+ source: ['player.soundon.fm/p/:id'],
74
+ },
75
+ ],
76
+ name: 'Podcast',
77
+ maintainers: ['TonyRL'],
78
+ view: ViewType.Audios,
79
+ handler,
80
+ };
@@ -0,0 +1,67 @@
1
+ export interface PodcastInfo {
2
+ id: string;
3
+ title: string;
4
+ channels: string[];
5
+ feedUrl: string;
6
+ explicit: boolean;
7
+ description: string;
8
+ itunesCategories: string[];
9
+ cover: string;
10
+ complete: boolean;
11
+ blocked: boolean;
12
+ lastIndexedAt: string;
13
+ publishDate: string;
14
+ copyright: string;
15
+ url: string;
16
+ tsv: string;
17
+ ownerEmail: string;
18
+ ownerName: string;
19
+ artistName: string;
20
+ language: string;
21
+ subtitle: string;
22
+ enableProductPage: boolean;
23
+ itunesType: string;
24
+ contentEncoded: string;
25
+ createdAt: string;
26
+ updatedAt: string;
27
+ donationUrl: string;
28
+ weight: number;
29
+ activated: boolean;
30
+ guid: string;
31
+ soundonId: string;
32
+ }
33
+
34
+ export interface Podcast {
35
+ id: string;
36
+ updatedAt: string;
37
+ createdAt: string;
38
+ data: PodcastData;
39
+ }
40
+
41
+ interface PodcastData {
42
+ id: string;
43
+ guid: string;
44
+ hash: string;
45
+ title: string;
46
+ audioUrl: string;
47
+ explicit: boolean;
48
+ description: string;
49
+ complete: boolean;
50
+ publishDate: string;
51
+ itunesKeywords: string[];
52
+ audioType: string;
53
+ duration: number;
54
+ artistName: string;
55
+ url: string;
56
+ cover: string;
57
+ contentEncoded: string;
58
+ podcastId: string;
59
+ summary: string;
60
+ episodeType: string;
61
+ exclusiveType: string;
62
+ createdAt: string;
63
+ updatedAt: string;
64
+ weight: number;
65
+ keywords: string[];
66
+ activated: boolean;
67
+ }
@@ -0,0 +1,80 @@
1
+ import { Route } from '@/types';
2
+ import cache from '@/utils/cache';
3
+ import { load } from 'cheerio';
4
+ import { parseDate } from '@/utils/parse-date';
5
+ import got from '@/utils/got';
6
+ import { ofetch } from 'ofetch';
7
+
8
+ const rootURL = 'https://scai.swjtu.edu.cn';
9
+ const pageURL = `${rootURL}/web/page-module.html?mid=B730BEB095B31840`;
10
+
11
+ export const route: Route = {
12
+ path: '/scai/bks',
13
+ categories: ['university'],
14
+ example: '/swjtu/scai/bks',
15
+ parameters: {},
16
+ features: {
17
+ requireConfig: false,
18
+ requirePuppeteer: false,
19
+ antiCrawler: true,
20
+ supportBT: false,
21
+ supportPodcast: false,
22
+ supportScihub: false,
23
+ },
24
+ radar: [
25
+ {
26
+ source: ['scai.swjtu.edu.cn/'],
27
+ },
28
+ ],
29
+ name: '计算机与人工智能学院',
30
+ description: '本科生教育',
31
+ maintainers: ['AzureG03'],
32
+ handler,
33
+ };
34
+
35
+ const getItem = (item, cache) => {
36
+ const title = item.find('a').text();
37
+ const link = `${rootURL}${item.find('a').attr('href').slice(2)}`;
38
+
39
+ return cache.tryGet(link, async () => {
40
+ const res = await ofetch(link);
41
+ const $ = load(res);
42
+
43
+ const pubDate = parseDate(
44
+ $('div.news-info span:nth-of-type(2)')
45
+ .text()
46
+ .match(/\d{4}(-|\/|.)\d{1,2}\1\d{1,2}/)[0]
47
+ );
48
+ const description = $('div.content-main').html();
49
+ return {
50
+ title,
51
+ pubDate,
52
+ link,
53
+ description,
54
+ };
55
+ });
56
+ };
57
+
58
+ async function handler() {
59
+ const res = await got({
60
+ method: 'get',
61
+ url: pageURL,
62
+ });
63
+
64
+ const $ = load(res.data);
65
+ const $list = $('div.list-top-item, div.item-wrapper');
66
+
67
+ const items = await Promise.all(
68
+ $list.toArray().map((i) => {
69
+ const $item = $(i);
70
+ return getItem($item, cache);
71
+ })
72
+ );
73
+
74
+ return {
75
+ title: '西南交大计算机学院-本科生教育',
76
+ link: pageURL,
77
+ item: items,
78
+ allowEmpty: true,
79
+ };
80
+ }
@@ -1,4 +1,4 @@
1
- import { Route } from '@/types';
1
+ import { Route, ViewType } from '@/types';
2
2
  import cache from '@/utils/cache';
3
3
  import * as cheerio from 'cheerio';
4
4
  import got from '@/utils/got';
@@ -6,7 +6,8 @@ import { parseDate } from '@/utils/parse-date';
6
6
 
7
7
  export const route: Route = {
8
8
  path: '/blog',
9
- categories: ['social-media'],
9
+ categories: ['social-media', 'popular'],
10
+ view: ViewType.Articles,
10
11
  example: '/telegram/blog',
11
12
  parameters: {},
12
13
  features: {
@@ -1,11 +1,12 @@
1
- import { Route } from '@/types';
1
+ import { Route, ViewType } from '@/types';
2
2
  import got from '@/utils/got';
3
3
  import { config } from '@/config';
4
4
  import ConfigNotFoundError from '@/errors/types/config-not-found';
5
5
 
6
6
  export const route: Route = {
7
7
  path: '/stickerpack/:name',
8
- categories: ['social-media'],
8
+ categories: ['social-media', 'popular'],
9
+ view: ViewType.Pictures,
9
10
  example: '/telegram/stickerpack/DIYgod',
10
11
  parameters: { name: 'Sticker Pack name, available in the sharing URL' },
11
12
  features: {
@@ -35,7 +35,8 @@ export const route: Route = {
35
35
 
36
36
  async function handler(ctx) {
37
37
  const mid = ctx.req.param('mid');
38
- const homePageInfoUrl = `https://i.news.qq.com/i/getUserHomepageInfo?chlid=${mid}`;
38
+ const userType = /^\d+$/.test(mid) ? 'chlid' : 'guestSuid';
39
+ const homePageInfoUrl = `https://i.news.qq.com/i/getUserHomepageInfo?${userType}=${mid}`;
39
40
  const userInfo = await cache.tryGet(homePageInfoUrl, async () => (await got(homePageInfoUrl)).data.userinfo);
40
41
  const title = userInfo.nick;
41
42
  const description = userInfo.user_desc;
@@ -9,6 +9,7 @@ import { art } from '@/utils/render';
9
9
  import path from 'node:path';
10
10
 
11
11
  import { apiSlug, bakeFilterSearchParams, bakeFiltersWithPair, bakeUrl, fetchData, getFilterParamsForUrl, parseFilterStr } from './util';
12
+ import timezone from '@/utils/timezone';
12
13
 
13
14
  export const handler = async (ctx) => {
14
15
  const { filter } = ctx.req.param();
@@ -78,7 +79,8 @@ export const handler = async (ctx) => {
78
79
  return {
79
80
  title: item.title?.rendered ?? item.title ?? title,
80
81
  description,
81
- pubDate: parseDate(item.date_gmt),
82
+ pubDate: timezone(parseDate(item.date_gmt), 0),
83
+ updated: timezone(parseDate(item.modified_gmt), 0),
82
84
  link: item.link,
83
85
  category: [...new Set(terminologies.flat().map((c) => c.name))],
84
86
  author: item._embedded.author.map((a) => a.name).join('/'),
@@ -88,7 +90,6 @@ export const handler = async (ctx) => {
88
90
  html: description,
89
91
  text: $$.text(),
90
92
  },
91
- updated: parseDate(item.modified_gmt),
92
93
  };
93
94
  });
94
95
 
@@ -0,0 +1,137 @@
1
+ import { Route } from '@/types';
2
+ import cache from '@/utils/cache';
3
+ import got from '@/utils/got';
4
+ import { load } from 'cheerio';
5
+ import { art } from '@/utils/render';
6
+ import path from 'node:path';
7
+ import { config } from '@/config';
8
+ import { getCurrentPath } from '@/utils/helpers';
9
+
10
+ export const route: Route = {
11
+ path: '/app/:category?',
12
+ categories: ['new-media'],
13
+ example: '/theinitium/app',
14
+ parameters: {
15
+ category: 'Category, see below, latest_sc by default',
16
+ },
17
+ features: {
18
+ requirePuppeteer: false,
19
+ antiCrawler: false,
20
+ supportBT: false,
21
+ supportPodcast: false,
22
+ supportScihub: false,
23
+ },
24
+ name: 'App',
25
+ maintainers: ['quiniapiezoelectricity'],
26
+ radar: [
27
+ {
28
+ source: ['app.theinitium.com/t/latest/:category'],
29
+ target: '/app/:category',
30
+ },
31
+ ],
32
+ handler,
33
+ description: `抓取[The Initium App](https://app.theinitium.com/)的文章列表
34
+
35
+ :::warning
36
+ 此路由暂不支持登陆认证
37
+ :::
38
+
39
+ Category 栏目:
40
+
41
+ | ----- | 简体中文 | 繁體中文 |
42
+ | ----- | ----------------- | ---------------- |
43
+ | 最新 | latest_sc | latest_tc |
44
+ | 日报 | daily_brief_sc | daily_brief_tc |
45
+ | 速递 | whats_new_sc | whats_new_tc |
46
+ | 专题 | report_sc | report_tc |
47
+ | 评论 | opinion_sc | opinion_tc |
48
+ | 国际 | international_sc | international_tc |
49
+ | 大陆 | mainland_sc | mainland_tc |
50
+ | 香港 | hongkong_sc | hongkong_tc |
51
+ | 台湾 | taiwan_sc | taiwan_tc |
52
+ | 播客 | article_audio_sc | article_audio_tc |`,
53
+ };
54
+
55
+ async function handler(ctx) {
56
+ const category = ctx.req.param('category') ?? 'latest_sc';
57
+ const __dirname = getCurrentPath(import.meta.url);
58
+
59
+ const feedListLink = 'https://app.theinitium.com/timelines.json';
60
+
61
+ const feedList = await cache.tryGet(
62
+ feedListLink,
63
+ async () =>
64
+ await got({
65
+ method: 'get',
66
+ url: feedListLink,
67
+ }),
68
+ config.cache.routeExpire,
69
+ false
70
+ );
71
+
72
+ const feedInfo = feedList.data.timelines.find((timeline) => timeline.id === category);
73
+
74
+ const link = `https://app.theinitium.com${feedInfo.feed.slice(1)}`;
75
+
76
+ const feedResponse = await got({
77
+ method: 'get',
78
+ url: link,
79
+ });
80
+
81
+ const feed = feedResponse.data.stories.filter((item) => item.type === 'article');
82
+
83
+ const items = await Promise.all(
84
+ feed.map((item) =>
85
+ cache.tryGet('https://app.theinitium.com/' + item.url.replaceAll('../', ''), async () => {
86
+ item.link = 'https://app.theinitium.com/' + item.url.replaceAll('../', '');
87
+ item.description = item.summary;
88
+ item.pubDate = item.published;
89
+ item.category = [];
90
+ if (item.section) {
91
+ item.category = [...item.category, item.section];
92
+ }
93
+ if (item.taxonomy) {
94
+ if (item.taxonomy.collection_tag) {
95
+ item.category = [...item.category, ...item.taxonomy.collection_tag];
96
+ }
97
+ if (item.taxonomy.sections) {
98
+ item.category = [...item.category, ...item.taxonomy.sections];
99
+ }
100
+ }
101
+ item.category = [...new Set(item.category)];
102
+ const response = await got(item.link);
103
+ const $ = load(response.data);
104
+ const article = $('.pp-article__body');
105
+ article.find('.block-related-articles').remove();
106
+ item.description = art(path.join(__dirname, 'templates/description.art'), {
107
+ header: $('.pp-header-group__standfirst').html(),
108
+ coverImage: $('.pp-media__image').attr('src'),
109
+ coverCaption: $('.pp-media__caption').html(),
110
+ article: article.html(),
111
+ copyright: $('.copyright').html(),
112
+ });
113
+ return item;
114
+ })
115
+ )
116
+ );
117
+
118
+ let lang;
119
+ let titleLoc;
120
+ if (feedInfo.timeline_sets[0] === 'chinese-simplified') {
121
+ lang = 'zh-hans';
122
+ titleLoc = '端传媒';
123
+ } else if (feedInfo.timeline_sets[0] === 'chinese-traditional') {
124
+ lang = 'zh-hant';
125
+ titleLoc = '端傳媒';
126
+ } else {
127
+ lang = 'zh-hans';
128
+ titleLoc = '端传媒';
129
+ }
130
+
131
+ return {
132
+ title: `${titleLoc} - ${feedInfo.title}`,
133
+ link: `https://app.theinitium.com/t/latest/${category}/`,
134
+ language: lang,
135
+ item: items,
136
+ };
137
+ }
@@ -0,0 +1,17 @@
1
+ {{ if header }}
2
+ <h4> {{ header }} </h4>
3
+ {{ /if }}
4
+ {{ if coverImage}}
5
+ <figure>
6
+ <img src={{ coverImage }}>
7
+ {{ if coverCaption }}
8
+ <figcaption>{{ coverCaption }}</figcaption>
9
+ {{ /if }}
10
+ </figure>
11
+ {{ /if }}
12
+ {{ if article }}
13
+ {{@ article }}
14
+ {{ /if }}
15
+ {{ if copyright }}
16
+ <figure><small>{{@ copyright }}</small></figure>
17
+ {{ /if }}
@@ -1,4 +1,4 @@
1
- import { Route } from '@/types';
1
+ import { Route, ViewType } from '@/types';
2
2
  import ofetch from '@/utils/ofetch';
3
3
  import { parseDate } from '@/utils/parse-date';
4
4
  import { REPLIES_QUERY, THREADS_QUERY, apiUrl, threadUrl, profileUrl, extractTokens, makeHeader, getUserId, buildContent } from './utils';
@@ -8,29 +8,35 @@ import { config } from '@/config';
8
8
 
9
9
  export const route: Route = {
10
10
  path: '/:user/:routeParams?',
11
- categories: ['social-media'],
11
+ categories: ['social-media', 'popular'],
12
+ view: ViewType.SocialMedia,
12
13
  example: '/threads/zuck',
13
- parameters: { user: 'Username', routeParams: 'Extra parameters, see the table below' },
14
- name: 'User timeline',
15
- maintainers: ['ninboy'],
16
- handler,
17
- description: `Specify options (in the format of query string) in parameter \`routeParams\` to control some extra features for threads
14
+ parameters: {
15
+ user: 'Username',
16
+ routeParams: {
17
+ description: `Extra parameters, see the table below
18
+ Specify options (in the format of query string) in parameter \`routeParams\` to control some extra features for threads
18
19
 
19
- | Key | Description | Accepts | Defaults to |
20
- | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------- | ----------- |
21
- | \`showAuthorInTitle\` | Show author name in title | \`0\`/\`1\`/\`true\`/\`false\` | \`true\` |
22
- | \`showAuthorInDesc\` | Show author name in description (RSS body) | \`0\`/\`1\`/\`true\`/\`false\` | \`true\` |
23
- | \`showQuotedAuthorAvatarInDesc\` | Show avatar of quoted author in description (RSS body) (Not recommended if your RSS reader extracts images from description) | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` |
24
- | \`showAuthorAvatarInDesc\` | Show avatar of author in description (RSS body) (Not recommended if your RSS reader extracts images from description) | \`0\`/\`1\`/\`true\`/\`false\` | \`falseP\` |
25
- | \`showEmojiForQuotesAndReply\` | Use "🔁" instead of "QT", "↩️" instead of "Re" | \`0\`/\`1\`/\`true\`/\`false\` | \`true\` |
26
- | \`showQuotedInTitle\` | Show quoted tweet in title | \`0\`/\`1\`/\`true\`/\`false\` | \`true\` |
27
- | \`replies\` | Show replies | \`0\`/\`1\`/\`true\`/\`false\` | \`true\` |
20
+ | Key | Description | Accepts | Defaults to |
21
+ | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------- | ----------- |
22
+ | \`showAuthorInTitle\` | Show author name in title | \`0\`/\`1\`/\`true\`/\`false\` | \`true\` |
23
+ | \`showAuthorInDesc\` | Show author name in description (RSS body) | \`0\`/\`1\`/\`true\`/\`false\` | \`true\` |
24
+ | \`showQuotedAuthorAvatarInDesc\` | Show avatar of quoted author in description (RSS body) (Not recommended if your RSS reader extracts images from description) | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` |
25
+ | \`showAuthorAvatarInDesc\` | Show avatar of author in description (RSS body) (Not recommended if your RSS reader extracts images from description) | \`0\`/\`1\`/\`true\`/\`false\` | \`falseP\` |
26
+ | \`showEmojiForQuotesAndReply\` | Use "🔁" instead of "QT", "↩️" instead of "Re" | \`0\`/\`1\`/\`true\`/\`false\` | \`true\` |
27
+ | \`showQuotedInTitle\` | Show quoted tweet in title | \`0\`/\`1\`/\`true\`/\`false\` | \`true\` |
28
+ | \`replies\` | Show replies | \`0\`/\`1\`/\`true\`/\`false\` | \`true\` |
28
29
 
29
- Specify different option values than default values to improve readability. The URL
30
+ Specify different option values than default values to improve readability. The URL
30
31
 
31
- \`\`\`
32
- https://rsshub.app/threads/zuck/showAuthorInTitle=1&showAuthorInDesc=1&showQuotedAuthorAvatarInDesc=1&showAuthorAvatarInDesc=1&showEmojiForQuotesAndReply=1&showQuotedInTitle=1
33
- \`\`\``,
32
+ \`\`\`
33
+ https://rsshub.app/threads/zuck/showAuthorInTitle=1&showAuthorInDesc=1&showQuotedAuthorAvatarInDesc=1&showAuthorAvatarInDesc=1&showEmojiForQuotesAndReply=1&showQuotedInTitle=1
34
+ \`\`\``,
35
+ },
36
+ },
37
+ name: 'User timeline',
38
+ maintainers: ['ninboy'],
39
+ handler,
34
40
  };
35
41
 
36
42
  async function handler(ctx) {
@@ -30,7 +30,7 @@ export const route: Route = {
30
30
  supportScihub: false,
31
31
  },
32
32
  name: 'College of Intelligence and Computing',
33
- maintainers: ['SuperPung'],
33
+ maintainers: ['AlanZeng423', 'SuperPung'],
34
34
  handler,
35
35
  description: `| College News | Notification | TJU Forum for CIC |
36
36
  | :----------: | :----------: | :---------------: |
@@ -38,7 +38,7 @@ export const route: Route = {
38
38
  };
39
39
 
40
40
  async function handler(ctx) {
41
- const type = ctx.params && ctx.req.param('type');
41
+ const type = ctx.req.param('type');
42
42
  let path, subtitle;
43
43
 
44
44
  switch (type) {
@@ -32,7 +32,7 @@ export const route: Route = {
32
32
  supportScihub: false,
33
33
  },
34
34
  name: 'News',
35
- maintainers: ['SuperPung'],
35
+ maintainers: ['AlanZeng423', 'SuperPung'],
36
36
  handler,
37
37
  description: `| Focus on TJU | General News | Internal News | Media Report | Pictures of TJU |
38
38
  | :----------: | :----------: | :-----------: | :----------: | :-------------: |
@@ -40,7 +40,7 @@ export const route: Route = {
40
40
  };
41
41
 
42
42
  async function handler(ctx) {
43
- const type = ctx.params && ctx.req.param('type');
43
+ const type = ctx.req.param('type');
44
44
  let path, subtitle;
45
45
 
46
46
  switch (type) {
@@ -37,7 +37,7 @@ export const route: Route = {
37
37
  supportScihub: false,
38
38
  },
39
39
  name: 'The Office of Academic Affairs',
40
- maintainers: ['AmosChenYQ', 'SuperPung'],
40
+ maintainers: ['AlanZeng423', 'AmosChenYQ', 'SuperPung'],
41
41
  handler,
42
42
  description: `| News | Notification |
43
43
  | :--: | :----------: |
@@ -45,7 +45,7 @@ export const route: Route = {
45
45
  };
46
46
 
47
47
  async function handler(ctx) {
48
- const type = ctx.params && ctx.req.param('type');
48
+ const type = ctx.req.param('type');
49
49
  let path, subtitle;
50
50
 
51
51
  switch (type) {
@@ -1,4 +1,4 @@
1
- import { Route } from '@/types';
1
+ import { Route, ViewType } from '@/types';
2
2
  import got from '@/utils/got';
3
3
  import { parseDate } from '@/utils/parse-date';
4
4
 
@@ -7,7 +7,8 @@ const TWITCH_CLIENT_ID = 'kimne78kx3ncx6brgo4mv6wki5h1ko';
7
7
 
8
8
  export const route: Route = {
9
9
  path: '/live/:login',
10
- categories: ['live'],
10
+ categories: ['live', 'popular'],
11
+ view: ViewType.Notifications,
11
12
  example: '/twitch/live/riotgames',
12
13
  parameters: { login: 'Twitch username' },
13
14
  features: {
@@ -1,5 +1,5 @@
1
1
  import InvalidParameterError from '@/errors/types/invalid-parameter';
2
- import { Route } from '@/types';
2
+ import { Route, ViewType } from '@/types';
3
3
  import got from '@/utils/got';
4
4
  import { parseDate } from '@/utils/parse-date';
5
5
 
@@ -14,7 +14,8 @@ const FILTER_NODE_TYPE_MAP = {
14
14
 
15
15
  export const route: Route = {
16
16
  path: '/video/:login/:filter?',
17
- categories: ['live'],
17
+ categories: ['live', 'popular'],
18
+ view: ViewType.Videos,
18
19
  example: '/twitch/video/riotgames/highlights',
19
20
  parameters: { login: 'Twitch username', filter: 'Video type, Default to all' },
20
21
  features: {
@@ -154,7 +154,7 @@ async function login({ username, password, authenticationSecret }) {
154
154
  if (subtask.open_account) {
155
155
  authentication = subtask.open_account;
156
156
  break;
157
- } else if (subtask.subtask_id === 'LoginTwoFactorAuthChallenge') {
157
+ } else if (authenticationSecret && subtask.subtask_id === 'LoginTwoFactorAuthChallenge') {
158
158
  const token = authenticator.generate(authenticationSecret);
159
159
 
160
160
  const task5 = await got.post('https://api.x.com/1.1/onboarding/task.json', {