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.
- package/lib/config.ts +18 -0
- package/lib/middleware/template.tsx +10 -2
- package/lib/routes/163/music/playlist.ts +2 -1
- package/lib/routes/5eplay/index.ts +1 -51
- package/lib/routes/a9vg/index.ts +214 -0
- package/lib/routes/a9vg/namespace.ts +1 -0
- package/lib/routes/a9vg/templates/description.art +17 -0
- package/lib/routes/aibase/discover.ts +388 -0
- package/lib/routes/aibase/namespace.ts +8 -0
- package/lib/routes/aibase/news.ts +118 -0
- package/lib/routes/aibase/templates/description.art +100 -0
- package/lib/routes/aibase/topic.ts +614 -0
- package/lib/routes/aibase/util.ts +114 -0
- package/lib/routes/apnews/api.ts +18 -3
- package/lib/routes/apnews/rss.ts +1 -1
- package/lib/routes/apnews/topics.ts +4 -3
- package/lib/routes/apple/podcast.ts +19 -15
- package/lib/routes/bangumi/templates/tv/subject.art +6 -0
- package/lib/routes/bangumi/tv/other/followrank.ts +19 -22
- package/lib/routes/bangumi/tv/user/collections.ts +172 -0
- package/lib/routes/bilibili/cache.ts +16 -8
- package/lib/routes/bilibili/utils.ts +85 -3
- package/lib/routes/bilibili/video.ts +7 -9
- package/lib/routes/bilibili/vsearch.ts +1 -1
- package/lib/routes/bjnews/cat.ts +9 -1
- package/lib/routes/cbpanet/index.ts +380 -0
- package/lib/routes/cbpanet/namespace.ts +8 -0
- package/lib/routes/ceph/blog.ts +72 -0
- package/lib/routes/ceph/namespace.ts +7 -0
- package/lib/routes/chinanews/index.ts +1 -1
- package/lib/routes/chinaventure/index.ts +1 -1
- package/lib/routes/cisia/index.ts +264 -0
- package/lib/routes/cisia/namespace.ts +8 -0
- package/lib/routes/cjlu/namespace.ts +10 -0
- package/lib/routes/cjlu/yjsy/index.ts +107 -0
- package/lib/routes/cnki/journals.ts +31 -2
- package/lib/routes/cohere/index.ts +54 -0
- package/lib/routes/cohere/namespace.ts +6 -0
- package/lib/routes/coolapk/dyh.ts +7 -1
- package/lib/routes/coolapk/hot.ts +7 -1
- package/lib/routes/coolapk/huati.ts +7 -1
- package/lib/routes/coolapk/namespace.ts +6 -0
- package/lib/routes/coolapk/toutiao.ts +7 -1
- package/lib/routes/coolapk/tuwen.ts +10 -5
- package/lib/routes/coolapk/user-dynamic.ts +7 -1
- package/lib/routes/damai/activity.ts +3 -2
- package/lib/routes/dcfever/trading.ts +3 -5
- package/lib/routes/dcfever/utils.ts +13 -4
- package/lib/routes/dealstreetasia/home.ts +72 -0
- package/lib/routes/dealstreetasia/namespace.ts +6 -0
- package/lib/routes/dealstreetasia/section.ts +57 -0
- package/lib/routes/dlsite/campaign.ts +1 -2
- package/lib/routes/dlsite/new.ts +1 -2
- package/lib/routes/dlsite/{index.ts → z-index/index.ts} +1 -1
- package/lib/routes/douban/other/topic.ts +10 -4
- package/lib/routes/douyin/types.ts +795 -0
- package/lib/routes/douyin/user.ts +51 -23
- package/lib/routes/douyin/utils.ts +1 -87
- package/lib/routes/dribbble/keyword.ts +1 -1
- package/lib/routes/dribbble/popular.ts +1 -1
- package/lib/routes/dribbble/user.ts +1 -1
- package/lib/routes/dribbble/utils.ts +16 -18
- package/lib/routes/famitsu/category.ts +1 -1
- package/lib/routes/fanbox/index.ts +1 -1
- package/lib/routes/fanbox/types.ts +1 -5
- package/lib/routes/fediverse/timeline.ts +21 -3
- package/lib/routes/follow/profile.ts +4 -2
- package/lib/routes/follow/types.ts +11 -1
- package/lib/routes/github/advisor.ts +97 -0
- package/lib/routes/github/discussions.ts +194 -0
- package/lib/routes/github/issue.ts +1 -1
- package/lib/routes/github/pulls.ts +1 -1
- package/lib/routes/gmcmonline/chinacustoms.ts +130 -0
- package/lib/routes/gmcmonline/namespace.ts +8 -0
- package/lib/routes/gov/csrc/csrc.ts +541 -0
- package/lib/routes/gov/customs/list.ts +5 -2
- package/lib/routes/gov/customs/namespace.ts +7 -0
- package/lib/routes/gov/jgjcndrc/index.ts +95 -66
- package/lib/routes/gov/moa/moa.ts +3 -3
- package/lib/routes/gov/moa/szcpxx.ts +115 -0
- package/lib/routes/gov/moa/zdscxx.ts +71 -21
- package/lib/routes/gov/ndrc/zfxxgk.ts +106 -0
- package/lib/routes/gov/pudong/zwgk.ts +65 -0
- package/lib/routes/gov/zj/search.ts +17 -12
- package/lib/routes/guancha/member.ts +1 -1
- package/lib/routes/hellogithub/index.ts +17 -67
- package/lib/routes/hellogithub/report.ts +1 -1
- package/lib/routes/hex-rays/index.ts +23 -29
- package/lib/routes/hfut/hf/notice.ts +43 -0
- package/lib/routes/hfut/hf/utils.ts +80 -0
- package/lib/routes/hfut/namespace.ts +6 -0
- package/lib/routes/hfut/xc/notice.ts +43 -0
- package/lib/routes/hfut/xc/utils.ts +73 -0
- package/lib/routes/hko/earthquake.ts +56 -0
- package/lib/routes/hko/namespace.ts +8 -0
- package/lib/routes/hko/weather.ts +56 -0
- package/lib/routes/huggingface/blog-zh.ts +1 -1
- package/lib/routes/hust/mse.ts +575 -0
- package/lib/routes/i-cable/namespace.ts +6 -0
- package/lib/routes/i-cable/news.ts +77 -0
- package/lib/routes/i-cable/templates/description.art +8 -0
- package/lib/routes/infoq/presentations.ts +203 -0
- package/lib/routes/infoq/templates/description.art +41 -0
- package/lib/routes/ipsw.dev/index.ts +64 -0
- package/lib/routes/ipsw.dev/namespace.ts +7 -0
- package/lib/routes/ipsw.dev/templates/description.art +20 -0
- package/lib/routes/ixigua/user-video.ts +18 -7
- package/lib/routes/javtiful/actress.ts +37 -0
- package/lib/routes/javtiful/channel.ts +37 -0
- package/lib/routes/javtiful/namespace.ts +6 -0
- package/lib/routes/javtiful/templates/description.art +7 -0
- package/lib/routes/javtiful/utils.ts +18 -0
- package/lib/routes/kisskiss/blog.ts +74 -0
- package/lib/routes/kisskiss/namespace.ts +6 -0
- package/lib/routes/ktown4u/artist-brandlist.ts +61 -0
- package/lib/routes/ktown4u/namespace.ts +6 -0
- package/lib/routes/lorientlejour/index.ts +186 -0
- package/lib/routes/lorientlejour/namespace.ts +7 -0
- package/lib/routes/lorientlejour/templates/description.art +18 -0
- package/lib/routes/lovelive-anime/namespace.ts +1 -1
- package/lib/routes/lovelive-anime/news.ts +56 -26
- package/lib/routes/lovelive-anime/schedules.ts +18 -6
- package/lib/routes/lovelive-anime/templates/description.art +1 -1
- package/lib/routes/lovelive-anime/templates/scheduleDesc.art +0 -1
- package/lib/routes/lovelive-anime/topics.ts +1 -1
- package/lib/routes/manhuagui/comic.ts +1 -1
- package/lib/routes/mi/crowdfunding.ts +43 -22
- package/lib/routes/mi/templates/crowdfunding.art +28 -0
- package/lib/routes/mi/types.ts +40 -0
- package/lib/routes/mi/utils.ts +80 -0
- package/lib/routes/misskey/utils.ts +1 -0
- package/lib/routes/misskon/namespace.ts +6 -0
- package/lib/routes/misskon/posts.ts +33 -0
- package/lib/routes/misskon/tag.ts +38 -0
- package/lib/routes/misskon/top.ts +67 -0
- package/lib/routes/misskon/utils.ts +41 -0
- package/lib/routes/natgeo/dailyphoto.ts +1 -1
- package/lib/routes/natgeo/dailyselection.ts +1 -1
- package/lib/routes/ncku/namespace.ts +1 -1
- package/lib/routes/ncku/phys.ts +95 -0
- package/lib/routes/news/namespace.ts +1 -1
- package/lib/routes/nikkei/cn/index.ts +12 -1
- package/lib/routes/nudt/yjszs.ts +33 -13
- package/lib/routes/nytimes/book.ts +11 -11
- package/lib/routes/nytimes/daily-briefing-chinese.ts +4 -4
- package/lib/routes/nytimes/namespace.ts +1 -1
- package/lib/routes/oncc/templates/article.art +1 -1
- package/lib/routes/papers/index.ts +7 -1
- package/lib/routes/parliament.uk/commonslibrary.ts +55 -0
- package/lib/routes/parliament.uk/lordslibrary.ts +55 -0
- package/lib/routes/parliament.uk/namespace.ts +6 -0
- package/lib/routes/picuki/profile.ts +50 -39
- package/lib/routes/pornhub/model.ts +3 -5
- package/lib/routes/pornhub/pornstar.ts +3 -5
- package/lib/routes/pornhub/users.ts +3 -5
- package/lib/routes/resonac/namespace.ts +6 -0
- package/lib/routes/resonac/products.ts +85 -0
- package/lib/routes/rsshub/transform/html.ts +114 -75
- package/lib/routes/rsshub/transform/json.ts +14 -8
- package/lib/routes/sciencenet/user.ts +3 -1
- package/lib/routes/scmp/utils.ts +2 -2
- package/lib/routes/skeb/following-creators.ts +52 -0
- package/lib/routes/skeb/following-works.ts +52 -0
- package/lib/routes/skeb/friend-works.ts +52 -0
- package/lib/routes/skeb/index.ts +131 -0
- package/lib/routes/skeb/namespace.ts +6 -0
- package/lib/routes/skeb/search.ts +77 -0
- package/lib/routes/skeb/templates/creator.art +8 -0
- package/lib/routes/skeb/templates/work.art +10 -0
- package/lib/routes/skeb/utils.ts +155 -0
- package/lib/routes/skeb/works.ts +88 -0
- package/lib/routes/skebetter/illust.ts +83 -0
- package/lib/routes/skebetter/index.ts +83 -0
- package/lib/routes/skebetter/manga.ts +65 -0
- package/lib/routes/skebetter/namespace.ts +6 -0
- package/lib/routes/skebetter/utils.ts +72 -0
- package/lib/routes/spankbang/namespace.ts +6 -0
- package/lib/routes/spankbang/new-videos.ts +90 -0
- package/lib/routes/spankbang/templates/video.art +7 -0
- package/lib/routes/straitstimes/index.ts +135 -0
- package/lib/routes/straitstimes/namespace.ts +7 -0
- package/lib/routes/straitstimes/templates/description.art +27 -0
- package/lib/routes/szftedu/dongtai.ts +62 -0
- package/lib/routes/szftedu/gonggao.ts +62 -0
- package/lib/routes/szftedu/namespace.ts +6 -0
- package/lib/routes/the/index.ts +1 -1
- package/lib/routes/tkww/index.ts +83 -0
- package/lib/routes/tkww/namespace.ts +6 -0
- package/lib/routes/ttv/index.ts +1 -1
- package/lib/routes/tvb/news.ts +2 -1
- package/lib/routes/twitter/api/mobile-api/login.ts +5 -0
- package/lib/routes/twitter/api/web-api/api.ts +16 -10
- package/lib/routes/twitter/api/web-api/constants.ts +1 -1
- package/lib/routes/twitter/api/web-api/utils.ts +94 -56
- package/lib/routes/twitter/list.ts +4 -12
- package/lib/routes/twitter/media.ts +13 -4
- package/lib/routes/twitter/user.ts +15 -6
- package/lib/routes/udn/breaking-news.ts +2 -2
- package/lib/routes/uestc/gr.ts +65 -37
- package/lib/routes/uestc/jwc.ts +49 -28
- package/lib/routes/wechat/ershcimi.ts +4 -2
- package/lib/routes/weibo/user.ts +10 -2
- package/lib/routes/xaut/index.ts +13 -20
- package/lib/routes/xaut/namespace.ts +1 -1
- package/lib/routes/xbookcn/blog.ts +66 -0
- package/lib/routes/xbookcn/namespace.ts +6 -0
- package/lib/routes/xiaoyuzhou/podcast.ts +35 -7
- package/lib/routes/xueqiu/cookies.ts +5 -3
- package/lib/routes/xueqiu/stock-info.ts +6 -12
- package/lib/routes/yande/namespace.ts +1 -1
- package/lib/routes/yande/post.ts +6 -6
- package/lib/routes/zaobao/util.ts +41 -43
- package/lib/routes/zhihu/activities.ts +2 -1
- package/lib/routes/zhihu/timeline.ts +6 -1
- package/lib/routes/zhihu/utils.ts +1 -1
- package/lib/routes/zjut/cs/index.ts +105 -0
- package/lib/routes/zjut/jwc/index.ts +117 -0
- package/lib/utils/cache/redis.ts +1 -1
- package/package.json +35 -36
- package/lib/routes/a9vg/a9vg.ts +0 -45
- package/lib/routes/gov/ndrc/zfxxgk/articles.ts +0 -73
- package/lib/routes-deprecated/hko/weather.js +0 -44
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { Route } from '@/types';
|
|
2
|
+
import { getCurrentPath } from '@/utils/helpers';
|
|
3
|
+
const __dirname = getCurrentPath(import.meta.url);
|
|
4
|
+
|
|
5
|
+
import cache from '@/utils/cache';
|
|
6
|
+
import got from '@/utils/got';
|
|
7
|
+
import { load } from 'cheerio';
|
|
8
|
+
import { parseDate } from '@/utils/parse-date';
|
|
9
|
+
import { art } from '@/utils/render';
|
|
10
|
+
import path from 'node:path';
|
|
11
|
+
|
|
12
|
+
export const handler = async (ctx) => {
|
|
13
|
+
const { conference } = ctx.req.param();
|
|
14
|
+
const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 12;
|
|
15
|
+
|
|
16
|
+
const rootUrl = 'https://www.infoq.com';
|
|
17
|
+
const currentUrl = new URL(`${conference ? `${conference}/` : ''}presentations/`, rootUrl).href;
|
|
18
|
+
|
|
19
|
+
const { data: response } = await got(currentUrl);
|
|
20
|
+
|
|
21
|
+
const $ = load(response);
|
|
22
|
+
|
|
23
|
+
const language = $('html').prop('lang');
|
|
24
|
+
|
|
25
|
+
let items = $('ul[data-tax="presentations"] li[data-path]')
|
|
26
|
+
.slice(0, limit)
|
|
27
|
+
.toArray()
|
|
28
|
+
.map((item) => {
|
|
29
|
+
item = $(item);
|
|
30
|
+
|
|
31
|
+
const a = item.find('h3.card__title a');
|
|
32
|
+
|
|
33
|
+
const title = a.prop('title') || a.text().trim();
|
|
34
|
+
const image = item.find('img.card__image').prop('src');
|
|
35
|
+
const description = art(path.join(__dirname, 'templates/description.art'), {
|
|
36
|
+
images: image
|
|
37
|
+
? [
|
|
38
|
+
{
|
|
39
|
+
src: image,
|
|
40
|
+
alt: title,
|
|
41
|
+
},
|
|
42
|
+
]
|
|
43
|
+
: undefined,
|
|
44
|
+
intro: item.find('p.card__excerpt').text(),
|
|
45
|
+
});
|
|
46
|
+
const link = new URL(a.prop('href'), rootUrl).href;
|
|
47
|
+
const guid = `infoq-${item.prop('data-path').replace(/^\//, '')}`;
|
|
48
|
+
const length = item.find('div.card__length').text() || undefined;
|
|
49
|
+
|
|
50
|
+
return {
|
|
51
|
+
title,
|
|
52
|
+
description,
|
|
53
|
+
pubDate: parseDate(item.find('span.card__date span').text().trim()),
|
|
54
|
+
link,
|
|
55
|
+
category: item
|
|
56
|
+
.find('div.card__topics')
|
|
57
|
+
.toArray()
|
|
58
|
+
.map((c) => $(c).text().trim()),
|
|
59
|
+
author: item
|
|
60
|
+
.find('div.card__authors a')
|
|
61
|
+
.toArray()
|
|
62
|
+
.map((a) => $(a).text().trim())
|
|
63
|
+
.join('/'),
|
|
64
|
+
guid,
|
|
65
|
+
id: guid,
|
|
66
|
+
content: {
|
|
67
|
+
html: description,
|
|
68
|
+
text: item.find('p.card__excerpt').text(),
|
|
69
|
+
},
|
|
70
|
+
image,
|
|
71
|
+
banner: image,
|
|
72
|
+
language,
|
|
73
|
+
enclosure_url: length ? link : undefined,
|
|
74
|
+
enclosure_type: length ? 'video/mp4' : undefined,
|
|
75
|
+
enclosure_title: title,
|
|
76
|
+
itunes_duration: length,
|
|
77
|
+
};
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
items = await Promise.all(
|
|
81
|
+
items.map((item) =>
|
|
82
|
+
cache.tryGet(item.link, async () => {
|
|
83
|
+
const { data: detailResponse } = await got(item.link);
|
|
84
|
+
|
|
85
|
+
const $$ = load(detailResponse);
|
|
86
|
+
|
|
87
|
+
$$('div.player').prevAll().remove();
|
|
88
|
+
$$('div.event__list-box').remove();
|
|
89
|
+
|
|
90
|
+
const length = $$('div.player__actions span').text() || undefined;
|
|
91
|
+
|
|
92
|
+
const script = $$('script[type="text/javascript"]').text();
|
|
93
|
+
const videoSrc = script.match(/P\.s\s=\s'(.*?)';/)?.[1] ?? undefined;
|
|
94
|
+
const poster = script.match(/P\.c\(.*?isWideScreen,\s'(.*?)',\s/)?.[1] ?? undefined;
|
|
95
|
+
const topicsStr = script.match(/var\stopicsInPage\s=\sJSON\.parse\('(.*?)'\);/)?.[1]?.replace(/\\/g, '') ?? undefined;
|
|
96
|
+
|
|
97
|
+
if (videoSrc) {
|
|
98
|
+
$$('div.player').replaceWith(
|
|
99
|
+
art(path.join(__dirname, 'templates/description.art'), {
|
|
100
|
+
videos: [
|
|
101
|
+
{
|
|
102
|
+
src: videoSrc,
|
|
103
|
+
poster,
|
|
104
|
+
type: `video/${videoSrc.split(/\./).pop()}`,
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
})
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const title = $$('meta[property="og:title"]').prop('content').trim();
|
|
112
|
+
const image = $$('meta[property="twitter:image"]').prop('content') || $$('meta[property="og:image"]').prop('content');
|
|
113
|
+
|
|
114
|
+
item.title = title;
|
|
115
|
+
item.pubDate = parseDate($$('p.date').text());
|
|
116
|
+
item.link = $$('meta[property="og:url"]').prop('content');
|
|
117
|
+
item.category = topicsStr ? JSON.parse(topicsStr).map((t) => t.name) : $$('meta[name="keywords"]').prop('content').split(/,/);
|
|
118
|
+
item.author = $$('ul.authors a.author__link')
|
|
119
|
+
.toArray()
|
|
120
|
+
.map((a) => $$(a).text())
|
|
121
|
+
.join('/');
|
|
122
|
+
|
|
123
|
+
$$('div.article__content').nextAll().remove();
|
|
124
|
+
|
|
125
|
+
const description = art(path.join(__dirname, 'templates/description.art'), {
|
|
126
|
+
images: image
|
|
127
|
+
? [
|
|
128
|
+
{
|
|
129
|
+
src: image,
|
|
130
|
+
alt: title,
|
|
131
|
+
},
|
|
132
|
+
]
|
|
133
|
+
: undefined,
|
|
134
|
+
description: $$('article.article').html(),
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
item.description = description;
|
|
138
|
+
item.content = {
|
|
139
|
+
html: description,
|
|
140
|
+
text: $$('article.article').text(),
|
|
141
|
+
};
|
|
142
|
+
item.image = image;
|
|
143
|
+
item.banner = image;
|
|
144
|
+
item.language = language;
|
|
145
|
+
item.enclosure_url = videoSrc;
|
|
146
|
+
item.enclosure_type = item.enclosure_url ? 'video/mp4' : undefined;
|
|
147
|
+
item.enclosure_title = title;
|
|
148
|
+
item.itunes_duration = length;
|
|
149
|
+
|
|
150
|
+
return item;
|
|
151
|
+
})
|
|
152
|
+
)
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
const title = $('title').text();
|
|
156
|
+
const image = $('meta[property="og:image"]').prop('content');
|
|
157
|
+
|
|
158
|
+
return {
|
|
159
|
+
title,
|
|
160
|
+
description: $('meta[name="description"]').prop('content'),
|
|
161
|
+
link: currentUrl,
|
|
162
|
+
item: items,
|
|
163
|
+
allowEmpty: true,
|
|
164
|
+
image,
|
|
165
|
+
author: title.split(/-/).pop(),
|
|
166
|
+
language,
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
export const route: Route = {
|
|
171
|
+
path: '/presentations/:conference?',
|
|
172
|
+
name: 'Presentations',
|
|
173
|
+
url: 'www.infoq.com',
|
|
174
|
+
maintainers: ['nczitzk'],
|
|
175
|
+
handler,
|
|
176
|
+
example: '/infoq/presentations',
|
|
177
|
+
parameters: { conference: 'Conference, all by default, can be found in URL' },
|
|
178
|
+
description: `:::tip
|
|
179
|
+
If you subscribe to [InfoQ Live Jan 2024](https://www.infoq.com/infoq-live-jan-2024/presentations/),where the URL is \`https://www.infoq.com/infoq-live-jan-2024/presentations/\`, extract the part \`https://www.infoq.com/\` to the end, which is \`/presentations/\`, and use it as the parameter to fill in. Therefore, the route will be [\`/infoq/presentations/infoq-live-jan-2024\`](https://rsshub.app/infoq/presentations/infoq-live-jan-2024).
|
|
180
|
+
:::
|
|
181
|
+
`,
|
|
182
|
+
categories: ['programming'],
|
|
183
|
+
|
|
184
|
+
features: {
|
|
185
|
+
requireConfig: false,
|
|
186
|
+
requirePuppeteer: false,
|
|
187
|
+
antiCrawler: false,
|
|
188
|
+
supportRadar: true,
|
|
189
|
+
supportBT: false,
|
|
190
|
+
supportPodcast: false,
|
|
191
|
+
supportScihub: false,
|
|
192
|
+
},
|
|
193
|
+
radar: [
|
|
194
|
+
{
|
|
195
|
+
source: ['www.infoq.com/presentations', 'www.infoq.com/:conference/presentations'],
|
|
196
|
+
target: (params) => {
|
|
197
|
+
const conference = params.conference;
|
|
198
|
+
|
|
199
|
+
return `/presentations${conference ? `/${conference}` : ''}`;
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
],
|
|
203
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{{ if images }}
|
|
2
|
+
{{ each images image }}
|
|
3
|
+
{{ if image?.src }}
|
|
4
|
+
<figure>
|
|
5
|
+
<img
|
|
6
|
+
{{ if image.alt }}
|
|
7
|
+
alt="{{ image.alt }}"
|
|
8
|
+
{{ /if }}
|
|
9
|
+
src="{{ image.src }}">
|
|
10
|
+
</figure>
|
|
11
|
+
{{ /if }}
|
|
12
|
+
{{ /each }}
|
|
13
|
+
{{ /if }}
|
|
14
|
+
|
|
15
|
+
{{ if videos }}
|
|
16
|
+
{{ each videos video }}
|
|
17
|
+
{{ if video?.src }}
|
|
18
|
+
<video
|
|
19
|
+
{{ set poster = video.poster || image?.src }}
|
|
20
|
+
{{ if poster }}
|
|
21
|
+
poster="{{ poster }}"
|
|
22
|
+
{{ /if }}
|
|
23
|
+
controls>
|
|
24
|
+
<source
|
|
25
|
+
src="{{ video.src }}"
|
|
26
|
+
type="{{ video.type }}">
|
|
27
|
+
<object data="{{ video.src }}">
|
|
28
|
+
<embed src="{{ video.src }}">
|
|
29
|
+
</object>
|
|
30
|
+
</video>
|
|
31
|
+
{{ /if }}
|
|
32
|
+
{{ /each }}
|
|
33
|
+
{{ /if }}
|
|
34
|
+
|
|
35
|
+
{{ if intro }}
|
|
36
|
+
<blockquote>{{ intro }}</blockquote>
|
|
37
|
+
{{ /if }}
|
|
38
|
+
|
|
39
|
+
{{ if description }}
|
|
40
|
+
{{@ description }}
|
|
41
|
+
{{ /if }}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Data, Route } from '@/types';
|
|
2
|
+
import got from '@/utils/got';
|
|
3
|
+
import { load } from 'cheerio';
|
|
4
|
+
import { art } from '@/utils/render';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
import { getCurrentPath } from '@/utils/helpers';
|
|
7
|
+
|
|
8
|
+
export const route: Route = {
|
|
9
|
+
path: '/index/:productID',
|
|
10
|
+
categories: ['program-update'],
|
|
11
|
+
example: '/ipsw.dev/index/iPhone16,1',
|
|
12
|
+
parameters: {
|
|
13
|
+
productID: 'Product ID',
|
|
14
|
+
},
|
|
15
|
+
name: 'Apple latest beta firmware',
|
|
16
|
+
maintainers: ['RieN7'],
|
|
17
|
+
handler,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
async function handler(ctx) {
|
|
21
|
+
const { productID } = ctx.req.param();
|
|
22
|
+
const __dirname = getCurrentPath(import.meta.url);
|
|
23
|
+
const link = `https://ipsw.dev/product/version/${productID}`;
|
|
24
|
+
|
|
25
|
+
const resp = await got({
|
|
26
|
+
method: 'get',
|
|
27
|
+
url: link,
|
|
28
|
+
headers: {
|
|
29
|
+
Referer: 'https://ipsw.dev/',
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const $ = load(resp.data);
|
|
34
|
+
|
|
35
|
+
const productName = $('#IdentifierModal > div > div > div.modal-body > p:nth-child(1) > em').text();
|
|
36
|
+
|
|
37
|
+
const list: Data[] = $('.firmware')
|
|
38
|
+
.map((index, element) => {
|
|
39
|
+
const ele = $(element);
|
|
40
|
+
const version = ele.find('td:nth-child(1) > div > div > strong').text();
|
|
41
|
+
const build = ele.find('td:nth-child(1) > div > div > div > code').text();
|
|
42
|
+
const date = ele.find('td:nth-child(3)').text();
|
|
43
|
+
const size = ele.find('td:nth-child(4)').text();
|
|
44
|
+
return {
|
|
45
|
+
title: `${productName} - ${version}`,
|
|
46
|
+
link: `https://ipsw.dev/download/${productID}/${build}`,
|
|
47
|
+
pubDate: new Date(date).toLocaleDateString(),
|
|
48
|
+
guid: build,
|
|
49
|
+
description: art(path.join(__dirname, 'templates/description.art'), {
|
|
50
|
+
version,
|
|
51
|
+
build,
|
|
52
|
+
date,
|
|
53
|
+
size,
|
|
54
|
+
}),
|
|
55
|
+
};
|
|
56
|
+
})
|
|
57
|
+
.get();
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
title: `${productName} Released`,
|
|
61
|
+
link,
|
|
62
|
+
item: list,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Namespace } from '@/types';
|
|
2
|
+
|
|
3
|
+
export const namespace: Namespace = {
|
|
4
|
+
name: 'IPSW.dev',
|
|
5
|
+
url: 'ipsw.dev',
|
|
6
|
+
description: 'Download the latest beta firmware for iPhone, iPad, Mac, Apple Vision Pro, and Apple TV. Check the signing status of the beta firmware.',
|
|
7
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<table>
|
|
2
|
+
<tbody>
|
|
3
|
+
<tr>
|
|
4
|
+
<th>Version</th>
|
|
5
|
+
<td>{{ version }}</td>
|
|
6
|
+
</tr>
|
|
7
|
+
<tr>
|
|
8
|
+
<th>Build</th>
|
|
9
|
+
<td>{{ build }}</td>
|
|
10
|
+
</tr>
|
|
11
|
+
<tr>
|
|
12
|
+
<th>Released</th>
|
|
13
|
+
<td>{{ released }}</td>
|
|
14
|
+
</tr>
|
|
15
|
+
<tr>
|
|
16
|
+
<th>Size</th>
|
|
17
|
+
<td>{{ size }}</td>
|
|
18
|
+
</tr>
|
|
19
|
+
</tbody>
|
|
20
|
+
</table>
|
|
@@ -30,7 +30,7 @@ export const route: Route = {
|
|
|
30
30
|
},
|
|
31
31
|
],
|
|
32
32
|
name: '用户视频投稿',
|
|
33
|
-
maintainers: [],
|
|
33
|
+
maintainers: ['FlashWingShadow', 'Fatpandac', 'pseudoyu'],
|
|
34
34
|
handler,
|
|
35
35
|
};
|
|
36
36
|
|
|
@@ -39,13 +39,24 @@ async function handler(ctx) {
|
|
|
39
39
|
const disableEmbed = ctx.req.param('disableEmbed');
|
|
40
40
|
const url = `${host}/home/${uid}/?wid_try=1`;
|
|
41
41
|
|
|
42
|
-
const
|
|
43
|
-
const $ = load(
|
|
44
|
-
const jsData = $('#SSR_HYDRATED_DATA').html()
|
|
45
|
-
const data = JSON.parse(jsData);
|
|
42
|
+
const { data } = await got(url);
|
|
43
|
+
const $ = load(data);
|
|
44
|
+
const jsData = $('#SSR_HYDRATED_DATA').html();
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
if (!jsData) {
|
|
47
|
+
throw new Error('Failed to find SSR_HYDRATED_DATA');
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const jsonData = JSON.parse(jsData.match(/var\s+data\s*=\s*({.*?});/s)?.[1].replaceAll('undefined', 'null') || '{}');
|
|
51
|
+
|
|
52
|
+
const {
|
|
53
|
+
AuthorVideoList: { videoList: videoInfos },
|
|
54
|
+
AuthorDetailInfo: userInfo,
|
|
55
|
+
} = jsonData;
|
|
56
|
+
|
|
57
|
+
if (!videoInfos || !userInfo) {
|
|
58
|
+
throw new Error('Failed to extract required data from JSON');
|
|
59
|
+
}
|
|
49
60
|
|
|
50
61
|
return {
|
|
51
62
|
title: `${userInfo.name} 的西瓜视频`,
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Route, Data, DataItem } from '@/types';
|
|
2
|
+
import ofetch from '@/utils/ofetch';
|
|
3
|
+
import { load } from 'cheerio';
|
|
4
|
+
import { parseItems } from './utils';
|
|
5
|
+
|
|
6
|
+
export const route: Route = {
|
|
7
|
+
path: '/actress/:id',
|
|
8
|
+
name: 'Actress',
|
|
9
|
+
maintainers: ['huanfe1'],
|
|
10
|
+
example: '/javtiful/actress/akari-tsumugi',
|
|
11
|
+
parameters: { id: 'Actress name' },
|
|
12
|
+
handler,
|
|
13
|
+
categories: ['multimedia'],
|
|
14
|
+
radar: [
|
|
15
|
+
{
|
|
16
|
+
source: ['javtiful.com/actress/:id', 'javtiful.com/actress/:id/*'],
|
|
17
|
+
target: '/actress/:id',
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
async function handler(ctx): Promise<Data> {
|
|
23
|
+
const { id } = ctx.req.param();
|
|
24
|
+
const html = await ofetch(`https://javtiful.com/actress/${id}`);
|
|
25
|
+
const $ = load(<string>html);
|
|
26
|
+
const items: DataItem[] = $('section .card:not(:has(.bg-danger))')
|
|
27
|
+
.toArray()
|
|
28
|
+
.map((item) => parseItems($(item)));
|
|
29
|
+
return {
|
|
30
|
+
title: $('.channel-item__name_details a').text(),
|
|
31
|
+
link: `https://javtiful.com/actress/${id}`,
|
|
32
|
+
allowEmpty: true,
|
|
33
|
+
item: items,
|
|
34
|
+
image: $('.content-section-title img').attr('src'),
|
|
35
|
+
language: $('html').attr('lang'),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Route, Data, DataItem } from '@/types';
|
|
2
|
+
import ofetch from '@/utils/ofetch';
|
|
3
|
+
import { load } from 'cheerio';
|
|
4
|
+
import { parseItems } from './utils';
|
|
5
|
+
|
|
6
|
+
export const route: Route = {
|
|
7
|
+
path: '/channel/:id',
|
|
8
|
+
name: 'Channel',
|
|
9
|
+
maintainers: ['huanfe1'],
|
|
10
|
+
example: '/javtiful/channel/madonna',
|
|
11
|
+
parameters: { id: 'Channel name' },
|
|
12
|
+
handler,
|
|
13
|
+
categories: ['multimedia'],
|
|
14
|
+
radar: [
|
|
15
|
+
{
|
|
16
|
+
source: ['javtiful.com/channel/:id', 'javtiful.com/channel/:id/*'],
|
|
17
|
+
target: '/channel/:id',
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
async function handler(ctx): Promise<Data> {
|
|
23
|
+
const { id } = ctx.req.param();
|
|
24
|
+
const html = await ofetch(`https://javtiful.com/channel/${id}`);
|
|
25
|
+
const $ = load(<string>html);
|
|
26
|
+
const items: DataItem[] = $('section .card:not(:has(.bg-danger))')
|
|
27
|
+
.toArray()
|
|
28
|
+
.map((item) => parseItems($(item)));
|
|
29
|
+
return {
|
|
30
|
+
title: $('.channel-item__name_details a').text(),
|
|
31
|
+
link: `https://javtiful.com/channel/${id}`,
|
|
32
|
+
allowEmpty: true,
|
|
33
|
+
item: items,
|
|
34
|
+
image: $('.content-section-title img').attr('src'),
|
|
35
|
+
language: $('html').attr('lang'),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { getCurrentPath } from '@/utils/helpers';
|
|
2
|
+
const __dirname = getCurrentPath(import.meta.url);
|
|
3
|
+
|
|
4
|
+
import { art } from '@/utils/render';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
import { parseRelativeDate } from '@/utils/parse-date';
|
|
7
|
+
|
|
8
|
+
const renderDescription = (data) => art(path.join(__dirname, 'templates/description.art'), data);
|
|
9
|
+
|
|
10
|
+
export const parseItems = (e) => ({
|
|
11
|
+
title: e.find('a > img').attr('alt')!,
|
|
12
|
+
link: e.find('a').attr('href')!,
|
|
13
|
+
description: renderDescription({
|
|
14
|
+
poster: e.find('a > img').data('src'),
|
|
15
|
+
previewVideo: e.find('a > span').data('trailer'),
|
|
16
|
+
}),
|
|
17
|
+
pubDate: parseRelativeDate(e.find('.video-addtime').text()),
|
|
18
|
+
});
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Route } from '@/types';
|
|
2
|
+
import got from '@/utils/got';
|
|
3
|
+
import { load } from 'cheerio';
|
|
4
|
+
import { parseDate } from '@/utils/parse-date';
|
|
5
|
+
import timezone from '@/utils/timezone';
|
|
6
|
+
|
|
7
|
+
const baseUrl = 'https://www.kisskiss.tv/kiss/diary.php';
|
|
8
|
+
|
|
9
|
+
export const route: Route = {
|
|
10
|
+
path: '/blog/:category?',
|
|
11
|
+
categories: ['game'],
|
|
12
|
+
example: '/blog/DLC',
|
|
13
|
+
parameters: { category: 'category' },
|
|
14
|
+
features: {
|
|
15
|
+
requireConfig: false,
|
|
16
|
+
requirePuppeteer: false,
|
|
17
|
+
antiCrawler: false,
|
|
18
|
+
supportBT: false,
|
|
19
|
+
supportPodcast: false,
|
|
20
|
+
supportScihub: false,
|
|
21
|
+
},
|
|
22
|
+
radar: [
|
|
23
|
+
{
|
|
24
|
+
source: ['www.kisskiss.tv/kiss/diary.php'],
|
|
25
|
+
target: '/blog',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
name: 'ブログ',
|
|
29
|
+
maintainers: ['keocheung'],
|
|
30
|
+
handler,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
async function handler(ctx) {
|
|
34
|
+
const { category } = ctx.req.param();
|
|
35
|
+
const url = category ? `${baseUrl}?category=${category}` : baseUrl;
|
|
36
|
+
|
|
37
|
+
const response = await got(url);
|
|
38
|
+
const $ = load(response.data);
|
|
39
|
+
|
|
40
|
+
const items = $('table.blog_frame_top')
|
|
41
|
+
.toArray()
|
|
42
|
+
.map((item) => {
|
|
43
|
+
const title = $(item);
|
|
44
|
+
const body = title.next('div.blog_frame_middle');
|
|
45
|
+
const i = {
|
|
46
|
+
title: title.find('tbody tr td').text(),
|
|
47
|
+
link: title.find('tbody tr td a').attr('href'),
|
|
48
|
+
pubDate: timezone(
|
|
49
|
+
parseDate(
|
|
50
|
+
body
|
|
51
|
+
.find('div.blog_data div.data_r')
|
|
52
|
+
.text()
|
|
53
|
+
.match(/\d+年\d+月\d+日 \(\d+:\d+\)/)[0],
|
|
54
|
+
'YYYY年M月D日 (HH:mm)'
|
|
55
|
+
),
|
|
56
|
+
9
|
|
57
|
+
),
|
|
58
|
+
};
|
|
59
|
+
body.find('a img').each(function () {
|
|
60
|
+
$(this).attr('src', $(this).parent('a').attr('href'));
|
|
61
|
+
$(this).unwrap();
|
|
62
|
+
});
|
|
63
|
+
body.find('div.blog_data').remove();
|
|
64
|
+
i.description = `<div lang="ja-JP">${body.html()}</div>`;
|
|
65
|
+
return i;
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
title: 'KISS ブログ',
|
|
70
|
+
link: url,
|
|
71
|
+
item: items,
|
|
72
|
+
language: 'ja',
|
|
73
|
+
};
|
|
74
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
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: '/artistBrandlist/:grpNo/:grpNo2?',
|
|
7
|
+
categories: ['shopping'],
|
|
8
|
+
example: '/ktown4u/artistBrandlist/234590/1723449',
|
|
9
|
+
parameters: { grpNo: 'artist id (Get in url)', grpNo2: 'product category id (Get in url), empty for all categories' },
|
|
10
|
+
features: {
|
|
11
|
+
requireConfig: false,
|
|
12
|
+
requirePuppeteer: false,
|
|
13
|
+
antiCrawler: false,
|
|
14
|
+
supportBT: false,
|
|
15
|
+
supportPodcast: false,
|
|
16
|
+
supportScihub: false,
|
|
17
|
+
},
|
|
18
|
+
radar: [
|
|
19
|
+
{
|
|
20
|
+
source: [],
|
|
21
|
+
target: '/artistBrandlist/:grpNo/:grpNo2',
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
name: 'Get the products on sale',
|
|
25
|
+
maintainers: ['JamesWDGu'],
|
|
26
|
+
handler: async (ctx) => {
|
|
27
|
+
const { grpNo, grpNo2 = '' } = ctx.req.param();
|
|
28
|
+
const data = await ofetch(`https://cn.ktown4u.com/selectArtistBrandList?cateGrpNo=${grpNo2}¤tPage=1&goodsSearch=newgoods&grpNo=${grpNo}&searchType=ARTIST`, {
|
|
29
|
+
method: 'POST',
|
|
30
|
+
headers: {
|
|
31
|
+
accept: 'application/json, text/plain, */*',
|
|
32
|
+
'accept-language': 'en,zh-CN;q=0.9,zh;q=0.8',
|
|
33
|
+
},
|
|
34
|
+
parseResponse: JSON.parse,
|
|
35
|
+
});
|
|
36
|
+
const items = data.map((item) => ({
|
|
37
|
+
title: item.GOODS_NM,
|
|
38
|
+
url: item.IMG_PATH,
|
|
39
|
+
link: `https://cn.ktown4u.com/iteminfo?goods_no=${item.GOODS_NO}`,
|
|
40
|
+
description: desc(item),
|
|
41
|
+
pubDate: parseDate(item.RELEASE_DT),
|
|
42
|
+
}));
|
|
43
|
+
|
|
44
|
+
return {
|
|
45
|
+
title: rssTitle(data),
|
|
46
|
+
link: `https://cn.ktown4u.com/artistBrandlist?grp_no=${grpNo}&grp_no2=${grpNo2}`,
|
|
47
|
+
item: items,
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const rssTitle = (data) => `ktown4u ${data[0].GRP_NM}`;
|
|
53
|
+
|
|
54
|
+
const desc = (item) => {
|
|
55
|
+
const saleState = item.SALE_YN === 'N' ? '【售罄】' : '';
|
|
56
|
+
let price = `${item.CURR_F_CD}${item.DISP_PRICE}`;
|
|
57
|
+
if (item.DISP_PRICE !== item.DISP_DC_PRICE) {
|
|
58
|
+
price = `${item.CURR_F_CD}${item.DISP_DC_PRICE} / 原价:${price}`;
|
|
59
|
+
}
|
|
60
|
+
return `${saleState} ${price} <br> <img src=${item.IMG_PATH}> <br> ${item.GOODS_NM}`;
|
|
61
|
+
};
|