rsshub 1.0.0-master.f97cdb2 → 1.0.0-master.fa3428f
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/README.md +1 -1
- package/lib/config.js +3 -1
- package/lib/radar-rules.js +0 -92
- package/lib/router.js +68 -71
- package/lib/routes/tencent/wechat/miniprogram/framework.js +4 -2
- package/lib/utils/common-config.js +4 -0
- package/lib/utils/parse-date.js +8 -7
- package/lib/utils/rand-user-agent.js +29 -0
- package/lib/utils/request-wrapper.js +2 -5
- package/lib/utils/wechat-mp.js +106 -10
- package/lib/v2/agirls/index.js +6 -0
- package/lib/v2/bilibili/video.js +1 -0
- package/lib/v2/bookfere/category.js +36 -0
- package/lib/v2/bookfere/maintainer.js +3 -0
- package/lib/v2/bookfere/radar.js +11 -0
- package/lib/v2/bookfere/router.js +3 -0
- package/lib/v2/cankaoxiaoxi/index.js +81 -0
- package/lib/v2/cankaoxiaoxi/maintainer.js +3 -0
- package/lib/v2/cankaoxiaoxi/radar.js +61 -0
- package/lib/v2/cankaoxiaoxi/router.js +3 -0
- package/lib/{routes → v2}/cctv/category.js +1 -1
- package/lib/{routes → v2}/cctv/jx.js +6 -1
- package/lib/{routes → v2}/cctv/lm.js +1 -1
- package/lib/v2/cctv/maintainer.js +7 -0
- package/lib/v2/cctv/radar.js +41 -0
- package/lib/v2/cctv/router.js +7 -0
- package/lib/{routes → v2}/cctv/special.js +6 -4
- package/lib/{routes → v2}/cctv/utils/mzzlbg.js +8 -6
- package/lib/{routes → v2}/cctv/utils/news.js +25 -22
- package/lib/{routes → v2}/cctv/utils/xinwen1j1.js +20 -17
- package/lib/v2/cctv/xwlb.js +50 -0
- package/lib/v2/chinacef/experts.js +38 -0
- package/lib/v2/chinacef/hot.js +38 -0
- package/lib/v2/chinacef/index.js +39 -0
- package/lib/v2/chinacef/maintainer.js +5 -0
- package/lib/v2/chinacef/radar.js +25 -0
- package/lib/v2/chinacef/router.js +5 -0
- package/lib/v2/{wechat → chinacef}/templates/description.art +0 -0
- package/lib/v2/chinacef/utils.js +55 -0
- package/lib/v2/chinanews/index.js +65 -0
- package/lib/v2/chinanews/maintainer.js +3 -0
- package/lib/v2/chinanews/radar.js +13 -0
- package/lib/v2/chinanews/router.js +3 -0
- package/lib/v2/cnbeta/index.js +2 -1
- package/lib/v2/cnbeta/utils.js +1 -0
- package/lib/v2/dapenti/maintainer.js +4 -0
- package/lib/v2/dapenti/radar.js +27 -0
- package/lib/v2/dapenti/router.js +4 -0
- package/lib/{routes → v2}/dapenti/subject.js +1 -1
- package/lib/{routes → v2}/dapenti/tugua.js +1 -1
- package/lib/v2/dapenti/utils.js +75 -0
- package/lib/{routes → v2}/dongqiudi/daily.js +10 -13
- package/lib/v2/dongqiudi/maintainer.js +8 -0
- package/lib/{routes → v2}/dongqiudi/player_news.js +0 -0
- package/lib/v2/dongqiudi/radar.js +45 -0
- package/lib/{routes → v2}/dongqiudi/result.js +2 -1
- package/lib/v2/dongqiudi/router.js +8 -0
- package/lib/{routes → v2}/dongqiudi/special.js +0 -0
- package/lib/{routes → v2}/dongqiudi/team_news.js +0 -0
- package/lib/{routes → v2}/dongqiudi/top_news.js +12 -15
- package/lib/{routes → v2}/dongqiudi/utils.js +47 -28
- package/lib/v2/dut/defaults.js +53 -0
- package/lib/v2/dut/index.js +78 -0
- package/lib/v2/dut/maintainer.js +14 -0
- package/lib/v2/dut/radar.js +109 -0
- package/lib/v2/dut/router.js +4 -0
- package/lib/v2/dut/shortcuts.js +77 -0
- package/lib/{routes → v2}/dx2025/index.js +0 -0
- package/lib/v2/dx2025/maintainer.js +3 -0
- package/lib/v2/dx2025/radar.js +19 -0
- package/lib/v2/dx2025/router.js +3 -0
- package/lib/v2/e-hentai/radar.js +21 -3
- package/lib/v2/eagle/blog.js +47 -0
- package/lib/{routes → v2}/eagle/changelog.js +3 -1
- package/lib/v2/eagle/maintainer.js +4 -0
- package/lib/v2/eagle/radar.js +101 -0
- package/lib/v2/eagle/router.js +4 -0
- package/lib/{routes → v2}/ehentai/ehapi.js +50 -21
- package/lib/{routes → v2}/ehentai/favorites.js +4 -2
- package/lib/v2/ehentai/maintainer.js +5 -0
- package/lib/v2/ehentai/router.js +5 -0
- package/lib/{routes → v2}/ehentai/search.js +5 -3
- package/lib/{routes → v2}/ehentai/tag.js +4 -2
- package/lib/v2/firefox/index.js +7 -2
- package/lib/v2/fortunechina/index.js +1 -1
- package/lib/v2/github/comments.js +7 -0
- package/lib/v2/gitpod/blog.js +8 -0
- package/lib/v2/gov/maintainer.js +1 -0
- package/lib/v2/gov/nrta/news.js +63 -0
- package/lib/v2/gov/radar.js +11 -0
- package/lib/v2/gov/router.js +1 -0
- package/lib/v2/guancha/index.js +1 -1
- package/lib/v2/guangdiu/cheaps.js +28 -0
- package/lib/v2/guangdiu/index.js +44 -0
- package/lib/v2/guangdiu/maintainer.js +5 -0
- package/lib/v2/guangdiu/radar.js +25 -0
- package/lib/v2/guangdiu/rank.js +38 -0
- package/lib/v2/guangdiu/router.js +5 -0
- package/lib/{routes/guokr/calendar.js → v2/guokr/channel.js} +2 -2
- package/lib/v2/guokr/maintainer.js +4 -0
- package/lib/v2/guokr/radar.js +19 -0
- package/lib/v2/guokr/router.js +4 -0
- package/lib/{routes → v2}/guokr/scientific.js +3 -3
- package/lib/v2/hkej/index.js +9 -15
- package/lib/v2/hkepc/index.js +8 -0
- package/lib/v2/hket/index.js +10 -2
- package/lib/v2/huangz/index.js +29 -0
- package/lib/v2/huangz/maintainer.js +3 -0
- package/lib/v2/huangz/radar.js +13 -0
- package/lib/v2/huangz/router.js +3 -0
- package/lib/v2/huanqiu/index.js +65 -0
- package/lib/v2/huanqiu/maintainer.js +3 -0
- package/lib/v2/huanqiu/radar.js +13 -0
- package/lib/v2/huanqiu/router.js +3 -0
- package/lib/v2/miris/blog.js +19 -0
- package/lib/v2/miris/maintainer.js +3 -0
- package/lib/v2/miris/radar.js +11 -0
- package/lib/v2/miris/router.js +3 -0
- package/lib/v2/news/whxw.js +2 -2
- package/lib/v2/npm/package.js +1 -1
- package/lib/v2/npm/router.js +1 -1
- package/lib/v2/qbittorrent/maintainer.js +3 -0
- package/lib/v2/qbittorrent/news.js +59 -0
- package/lib/v2/qbittorrent/radar.js +13 -0
- package/lib/v2/qbittorrent/router.js +3 -0
- package/lib/v2/rsshub/sponsors.js +1 -0
- package/lib/{routes → v2}/sciencenet/blog.js +17 -12
- package/lib/v2/sciencenet/maintainer.js +4 -0
- package/lib/v2/sciencenet/radar.js +19 -0
- package/lib/v2/sciencenet/router.js +4 -0
- package/lib/v2/sciencenet/user.js +65 -0
- package/lib/v2/sdu/cmse.js +59 -0
- package/lib/v2/sdu/cs.js +57 -0
- package/lib/v2/sdu/data.js +110 -0
- package/lib/v2/sdu/epe.js +55 -0
- package/lib/v2/sdu/extractor/index.js +15 -0
- package/lib/v2/sdu/extractor/sdrj.js +21 -0
- package/lib/v2/sdu/extractor/view.js +21 -0
- package/lib/v2/sdu/extractor/wh/jwc.js +24 -0
- package/lib/v2/sdu/extractor/wh/news.js +21 -0
- package/lib/v2/sdu/maintainer.js +9 -0
- package/lib/v2/sdu/mech.js +60 -0
- package/lib/v2/sdu/radar.js +159 -0
- package/lib/v2/sdu/router.js +9 -0
- package/lib/v2/sdu/sc.js +61 -0
- package/lib/v2/sdu/wh/jwc.js +42 -0
- package/lib/v2/sdu/wh/news.js +38 -0
- package/lib/v2/stratechery/index.js +20 -0
- package/lib/v2/stratechery/maintainer.js +3 -0
- package/lib/v2/stratechery/radar.js +11 -0
- package/lib/v2/stratechery/router.js +3 -0
- package/lib/{routes → v2}/taptap/changelog.js +2 -1
- package/lib/v2/taptap/maintainer.js +5 -0
- package/lib/v2/taptap/radar.js +25 -0
- package/lib/v2/taptap/review.js +69 -0
- package/lib/v2/taptap/router.js +5 -0
- package/lib/v2/taptap/templates/videoPost.art +2 -0
- package/lib/v2/taptap/topic.js +79 -0
- package/lib/v2/taptap/utils.js +48 -0
- package/lib/v2/thecover/channel.js +66 -0
- package/lib/v2/thecover/maintainer.js +3 -0
- package/lib/v2/thecover/radar.js +13 -0
- package/lib/v2/thecover/router.js +3 -0
- package/lib/{routes → v2}/twreporter/category.js +7 -12
- package/lib/{routes → v2}/twreporter/fetch_article.js +5 -4
- package/lib/v2/twreporter/maintainer.js +5 -0
- package/lib/{routes → v2}/twreporter/newest.js +8 -13
- package/lib/v2/twreporter/photography.js +46 -0
- package/lib/v2/twreporter/radar.js +25 -0
- package/lib/v2/twreporter/router.js +5 -0
- package/lib/{routes/tencent → v2}/wechat/announce.js +3 -2
- package/lib/v2/wechat/ce.js +69 -0
- package/lib/v2/wechat/data258.js +137 -0
- package/lib/v2/wechat/ershcimi.js +35 -0
- package/lib/{routes/tencent → v2}/wechat/feeds.js +0 -0
- package/lib/v2/wechat/maintainer.js +11 -0
- package/lib/{routes/tencent → v2}/wechat/mp.js +0 -0
- package/lib/{routes/tencent → v2}/wechat/msgalbum.js +0 -0
- package/lib/v2/wechat/radar.js +76 -1
- package/lib/v2/wechat/router.js +11 -0
- package/lib/{routes/tencent → v2}/wechat/tgchannel.js +0 -0
- package/lib/{routes/tencent → v2}/wechat/uread.js +0 -0
- package/lib/{routes/tencent → v2}/wechat/wemp.js +0 -0
- package/lib/{routes/tencent → v2}/wechat/wxnmh.js +0 -0
- package/lib/{routes → v2}/xueqiu/favorite.js +2 -1
- package/lib/v2/xueqiu/fund.js +50 -0
- package/lib/{routes → v2}/xueqiu/hots.js +2 -1
- package/lib/v2/xueqiu/maintainer.js +10 -0
- package/lib/v2/xueqiu/radar.js +60 -0
- package/lib/v2/xueqiu/router.js +10 -0
- package/lib/{routes → v2}/xueqiu/snb.js +2 -1
- package/lib/{routes → v2}/xueqiu/stock_comments.js +4 -20
- package/lib/{routes → v2}/xueqiu/stock_info.js +2 -1
- package/lib/v2/xueqiu/templates/comments_description.art +10 -0
- package/lib/{routes → v2}/xueqiu/user.js +2 -1
- package/lib/{routes → v2}/xueqiu/user_stock.js +3 -2
- package/lib/v2/yunspe/maintainer.js +3 -0
- package/lib/v2/yunspe/newsflash.js +42 -0
- package/lib/v2/yunspe/radar.js +13 -0
- package/lib/v2/yunspe/router.js +3 -0
- package/lib/{routes → v2}/yystv/category.js +8 -8
- package/lib/{routes → v2}/yystv/docs.js +2 -2
- package/lib/v2/yystv/maintainer.js +4 -0
- package/lib/v2/yystv/radar.js +49 -0
- package/lib/v2/yystv/router.js +4 -0
- package/lib/{routes/universities → v2}/zju/career/index.js +14 -13
- package/lib/{routes/universities → v2}/zju/cst/custom.js +2 -1
- package/lib/{routes/universities → v2}/zju/cst/index.js +20 -24
- package/lib/v2/zju/grs/index.js +43 -0
- package/lib/v2/zju/list.js +66 -0
- package/lib/v2/zju/maintainer.js +8 -0
- package/lib/v2/zju/physics/index.js +52 -0
- package/lib/v2/zju/radar.js +139 -0
- package/lib/v2/zju/router.js +8 -0
- package/lib/views/atom.art +13 -1
- package/lib/views/welcome.art +4 -1
- package/package.json +13 -12
- package/lib/routes/cctv/xwlb.js +0 -48
- package/lib/routes/dapenti/utils.js +0 -73
- package/lib/routes/taptap/review.js +0 -39
- package/lib/routes/taptap/topic.js +0 -85
- package/lib/routes/tencent/wechat/_README +0 -1
- package/lib/routes/tencent/wechat/ce.js +0 -40
- package/lib/routes/tencent/wechat/ershcimi.js +0 -43
- package/lib/routes/twreporter/photography.js +0 -57
- package/lib/routes/universities/dut/index.js +0 -60
- package/lib/routes/universities/dut/subsite.js +0 -50
- package/lib/routes/universities/sdu/cmse.js +0 -55
- package/lib/routes/universities/sdu/cs.js +0 -55
- package/lib/routes/universities/sdu/epe.js +0 -54
- package/lib/routes/universities/sdu/mech.js +0 -58
- package/lib/routes/universities/sdu/sc.js +0 -56
- package/lib/routes/universities/zju/grs/index.js +0 -44
- package/lib/routes/universities/zju/list.js +0 -78
- package/lib/routes/universities/zju/physics/index.js +0 -55
- package/lib/routes/xueqiu/fund.js +0 -71
- package/lib/v2/wechat/templates/image.art +0 -1
package/lib/v2/wechat/router.js
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
module.exports = function (router) {
|
|
2
|
+
router.get('/announce', require('./announce'));
|
|
3
|
+
router.get('/ce/:id', require('./ce'));
|
|
4
|
+
router.get('/data258/:id?', require('./data258'));
|
|
5
|
+
router.get('/ershicimi/:id', require('./ershcimi'));
|
|
2
6
|
router.get('/feeddd/:id', require('./feeddd'));
|
|
7
|
+
router.get('/feeds/:id', require('./feeds'));
|
|
8
|
+
router.get('/mp/homepage/:biz/:hid/:cid?', require('./mp'));
|
|
9
|
+
router.get('/mp/msgalbum/:biz/:aid', require('./msgalbum'));
|
|
10
|
+
router.get('/tgchannel/:id/:mpName?/:searchQueryType?', require('./tgchannel'));
|
|
11
|
+
router.get('/uread/:userid', require('./uread'));
|
|
12
|
+
router.get('/wemp/:id', require('./wemp'));
|
|
13
|
+
router.get('/wxnmh/:id', require('./wxnmh'));
|
|
3
14
|
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
const queryString = require('query-string');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
3
4
|
|
|
4
5
|
module.exports = async (ctx) => {
|
|
5
6
|
const id = ctx.params.id;
|
|
@@ -30,7 +31,7 @@ module.exports = async (ctx) => {
|
|
|
30
31
|
item: data.map((item) => ({
|
|
31
32
|
title: item.title,
|
|
32
33
|
description: item.description,
|
|
33
|
-
pubDate:
|
|
34
|
+
pubDate: parseDate(item.created_at),
|
|
34
35
|
link: `https://xueqiu.com${item.target}`,
|
|
35
36
|
})),
|
|
36
37
|
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
3
|
+
const timezone = require('@/utils/timezone');
|
|
4
|
+
|
|
5
|
+
module.exports = async (ctx) => {
|
|
6
|
+
const guid = ctx.params.id;
|
|
7
|
+
const appUrl = `https://danjuanapp.com/funding/${guid}`;
|
|
8
|
+
const url = `https://danjuanapp.com/djapi/fund/${guid}`;
|
|
9
|
+
const response = await got({
|
|
10
|
+
method: 'get',
|
|
11
|
+
url,
|
|
12
|
+
headers: {
|
|
13
|
+
Referer: appUrl,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
const fd_full_name = response.data.data.fd_full_name;
|
|
17
|
+
const fd_name = response.data.data.fd_name;
|
|
18
|
+
const fd_code = response.data.data.fd_code;
|
|
19
|
+
const unit_nav = response.data.data.fund_derived.unit_nav;
|
|
20
|
+
const nav_grtd = response.data.data.fund_derived.nav_grtd;
|
|
21
|
+
const end_date = response.data.data.fund_derived.end_date;
|
|
22
|
+
|
|
23
|
+
let description = `基金代码 ${fd_code} <br> 今日净值(${end_date}) ¥${unit_nav} `;
|
|
24
|
+
let title = fd_full_name;
|
|
25
|
+
|
|
26
|
+
if (nav_grtd > 0) {
|
|
27
|
+
description += `<br> 日涨跌 ${nav_grtd}%`;
|
|
28
|
+
title += `📈 ${nav_grtd}%`;
|
|
29
|
+
} else if (nav_grtd < 0) {
|
|
30
|
+
description += `<br> 日跌跌 ${nav_grtd}%`;
|
|
31
|
+
title += `📉 ${nav_grtd}%`;
|
|
32
|
+
} else if (nav_grtd === '0.0000') {
|
|
33
|
+
description += '无波动';
|
|
34
|
+
title += '持平';
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const single = {
|
|
38
|
+
title,
|
|
39
|
+
description,
|
|
40
|
+
pubDate: timezone(parseDate(end_date), +8),
|
|
41
|
+
link: appUrl,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
ctx.state.data = {
|
|
45
|
+
title: fd_name,
|
|
46
|
+
link: appUrl,
|
|
47
|
+
description,
|
|
48
|
+
item: [single],
|
|
49
|
+
};
|
|
50
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
const queryString = require('query-string');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
3
4
|
|
|
4
5
|
module.exports = async (ctx) => {
|
|
5
6
|
const res1 = await got({
|
|
@@ -35,7 +36,7 @@ module.exports = async (ctx) => {
|
|
|
35
36
|
return {
|
|
36
37
|
title: item.title ? item.title : description.replace(/<[^>]+>/g, ''),
|
|
37
38
|
description: item.text,
|
|
38
|
-
pubDate:
|
|
39
|
+
pubDate: parseDate(item.created_at),
|
|
39
40
|
link: `https://xueqiu.com${item.target}`,
|
|
40
41
|
author: item.user.screen_name,
|
|
41
42
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'/favorite/:id': ['imlonghao'],
|
|
3
|
+
'/fund/:id': ['HenryQW', 'NathanDai'],
|
|
4
|
+
'/hots': ['hillerliao'],
|
|
5
|
+
'/snb/:id': ['ZhishanZhang'],
|
|
6
|
+
'/stock_comments/:id/:titleLength?': ['zytomorrow'],
|
|
7
|
+
'/stock_info/:id/:type?': ['YuYang'],
|
|
8
|
+
'/user/:id/:type?': ['imlonghao'],
|
|
9
|
+
'/user_stock/:id': ['hillerliao'],
|
|
10
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'danjuanapp.com': {
|
|
3
|
+
_name: '雪球',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: '蛋卷基金净值更新',
|
|
7
|
+
docs: 'https://docs.rsshub.app/finance.html#xue-qiu',
|
|
8
|
+
source: ['/funding/:id'],
|
|
9
|
+
target: '/xueqiu/funding/:id',
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
},
|
|
13
|
+
'xueqiu.com': {
|
|
14
|
+
_name: '雪球',
|
|
15
|
+
'.': [
|
|
16
|
+
{
|
|
17
|
+
title: '用户动态',
|
|
18
|
+
docs: 'https://docs.rsshub.app/finance.html#xue-qiu',
|
|
19
|
+
source: ['/u/:id'],
|
|
20
|
+
target: '/xueqiu/user/:id',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
title: '用户收藏动态',
|
|
24
|
+
docs: 'https://docs.rsshub.app/finance.html#xue-qiu',
|
|
25
|
+
source: ['/u/:id'],
|
|
26
|
+
target: '/xueqiu/favorite/:id',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
title: '用户自选动态',
|
|
30
|
+
docs: 'https://docs.rsshub.app/finance.html#xue-qiu',
|
|
31
|
+
source: ['/u/:id'],
|
|
32
|
+
target: '/xueqiu/user_stock/:id',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
title: '组合最新调仓信息',
|
|
36
|
+
docs: 'https://docs.rsshub.app/finance.html#xue-qiu',
|
|
37
|
+
source: ['/p/:id'],
|
|
38
|
+
target: '/xueqiu/snb/:id',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
title: '股票信息',
|
|
42
|
+
docs: 'https://docs.rsshub.app/finance.html#xue-qiu',
|
|
43
|
+
source: ['/S/:id'],
|
|
44
|
+
target: '/xueqiu/stock_info/:id',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
title: '股票评论',
|
|
48
|
+
docs: 'https://docs.rsshub.app/finance.html#xue-qiu',
|
|
49
|
+
source: ['/S/:id'],
|
|
50
|
+
target: '/xueqiu/stock_comments/:id',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
title: '热帖',
|
|
54
|
+
docs: 'https://docs.rsshub.app/finance.html#xue-qiu',
|
|
55
|
+
source: ['/'],
|
|
56
|
+
target: '/xueqiu/hots',
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
module.exports = (router) => {
|
|
2
|
+
router.get('/favorite/:id', require('./favorite'));
|
|
3
|
+
router.get('/fund/:id', require('./fund'));
|
|
4
|
+
router.get('/hots', require('./hots'));
|
|
5
|
+
router.get('/snb/:id', require('./snb'));
|
|
6
|
+
router.get('/stock_comments/:id/:titleLength?', require('./stock_comments'));
|
|
7
|
+
router.get('/stock_info/:id/:type?', require('./stock_info'));
|
|
8
|
+
router.get('/user/:id/:type?', require('./user'));
|
|
9
|
+
router.get('/user_stock/:id', require('./user_stock'));
|
|
10
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
2
3
|
|
|
3
4
|
module.exports = async (ctx) => {
|
|
4
5
|
const id = ctx.params.id;
|
|
@@ -28,7 +29,7 @@ module.exports = async (ctx) => {
|
|
|
28
29
|
const single = {
|
|
29
30
|
title,
|
|
30
31
|
description,
|
|
31
|
-
pubDate:
|
|
32
|
+
pubDate: parseDate(time),
|
|
32
33
|
link: url,
|
|
33
34
|
guid: `xueqiu::snb::${id}::${time}`,
|
|
34
35
|
};
|
|
@@ -1,28 +1,12 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
const cheerio = require('cheerio');
|
|
3
|
-
const
|
|
3
|
+
const { art } = require('@/utils/render');
|
|
4
|
+
const path = require('path');
|
|
4
5
|
const { parseDate } = require('@/utils/parse-date');
|
|
5
6
|
|
|
6
|
-
const description_template = `
|
|
7
|
-
<a href='https://xueqiu.com/u/{{item.user.id}}'>
|
|
8
|
-
<div style="font-weight: bold;">{{item.user.screen_name}}:</div>
|
|
9
|
-
</a>
|
|
10
|
-
<hr/>
|
|
11
|
-
{{item.text}}
|
|
12
|
-
<br/>
|
|
13
|
-
{{if item.retweeted_status}}
|
|
14
|
-
<hr style="border:1 dashed #987cb9" />
|
|
15
|
-
{{item.retweeted_status.text}}
|
|
16
|
-
{{else}}
|
|
17
|
-
<hr/>
|
|
18
|
-
{{/if}}
|
|
19
|
-
<div style="text-align:right">
|
|
20
|
-
----来源于:{{item.source}}
|
|
21
|
-
</div>`;
|
|
22
|
-
|
|
23
7
|
module.exports = async (ctx) => {
|
|
24
8
|
const id = ctx.params.id;
|
|
25
|
-
const titleLength = ctx.params.titleLength
|
|
9
|
+
const titleLength = ctx.params.titleLength ? parseInt(ctx.params.titleLength) : 30;
|
|
26
10
|
|
|
27
11
|
const res = await got({
|
|
28
12
|
method: 'get',
|
|
@@ -49,7 +33,7 @@ module.exports = async (ctx) => {
|
|
|
49
33
|
if (item.quote_cards) {
|
|
50
34
|
link = item.quote_cards[0].target_url;
|
|
51
35
|
}
|
|
52
|
-
const description =
|
|
36
|
+
const description = art(path.join(__dirname, 'templates/comments_description.art'), { item });
|
|
53
37
|
return {
|
|
54
38
|
title: item.title !== '' ? item.title : item.text.replace(/<[^>]+>/g, '').slice(0, titleLength),
|
|
55
39
|
description,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
const cheerio = require('cheerio');
|
|
3
3
|
const queryString = require('query-string');
|
|
4
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
5
|
|
|
5
6
|
module.exports = async (ctx) => {
|
|
6
7
|
const id = ctx.params.id;
|
|
@@ -63,7 +64,7 @@ module.exports = async (ctx) => {
|
|
|
63
64
|
return {
|
|
64
65
|
title: item.title !== '' ? item.title : item.description.replace(/<[^>]+>/g, ''),
|
|
65
66
|
description: item.description,
|
|
66
|
-
pubDate:
|
|
67
|
+
pubDate: parseDate(item.created_at),
|
|
67
68
|
link,
|
|
68
69
|
};
|
|
69
70
|
}),
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<a href='https://xueqiu.com/u/{{ item.user.id }}'><div style="font-weight: bold;">{{ item.user.screen_name }}:</div></a>
|
|
2
|
+
<hr/>
|
|
3
|
+
{{@ item.text }}
|
|
4
|
+
<br/>
|
|
5
|
+
{{ if item.retweeted_status }}
|
|
6
|
+
<hr style="border:1 dashed #987cb9" />{{@ item.retweeted_status.text }}
|
|
7
|
+
{{ else }}
|
|
8
|
+
<hr/>
|
|
9
|
+
{{ /if }}
|
|
10
|
+
<div style="text-align:right"> ----来源于:{{ item.source }}</div>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
const queryString = require('query-string');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
3
4
|
|
|
4
5
|
module.exports = async (ctx) => {
|
|
5
6
|
const id = ctx.params.id;
|
|
@@ -44,7 +45,7 @@ module.exports = async (ctx) => {
|
|
|
44
45
|
return {
|
|
45
46
|
title: item.title ? item.title : description.replace(/<[^>]+>/g, ''),
|
|
46
47
|
description,
|
|
47
|
-
pubDate:
|
|
48
|
+
pubDate: parseDate(item.created_at),
|
|
48
49
|
link: `https://xueqiu.com${item.target}`,
|
|
49
50
|
};
|
|
50
51
|
}),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
const queryString = require('query-string');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
3
4
|
|
|
4
5
|
module.exports = async (ctx) => {
|
|
5
6
|
const id = ctx.params.id;
|
|
@@ -39,8 +40,8 @@ module.exports = async (ctx) => {
|
|
|
39
40
|
description: `@${screen_name} 的雪球自选动态`,
|
|
40
41
|
item: data.map((item) => ({
|
|
41
42
|
title: `@${screen_name} 关注了股票 ${item.name}`,
|
|
42
|
-
description: `@${screen_name} 在${
|
|
43
|
-
pubDate:
|
|
43
|
+
description: `@${screen_name} 在${parseDate(item.created).toLocaleString()} 关注了 ${item.name}(${item.exchange}:${item.symbol})。`,
|
|
44
|
+
pubDate: parseDate(item.created),
|
|
44
45
|
link: `https://xueqiu.com/s/${item.symbol}`,
|
|
45
46
|
})),
|
|
46
47
|
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
3
|
+
const timezone = require('@/utils/timezone');
|
|
4
|
+
|
|
5
|
+
module.exports = async (ctx) => {
|
|
6
|
+
const response = await got({
|
|
7
|
+
method: 'post',
|
|
8
|
+
url: 'https://www.yunspe.com/wp-json/b2/v1/getNewsflashesList',
|
|
9
|
+
headers: {
|
|
10
|
+
Referer: 'https://www.yunspe.com/newsflashes',
|
|
11
|
+
'content-type': 'application/x-www-form-urlencoded',
|
|
12
|
+
},
|
|
13
|
+
body: 'paged=1&term=0&post_paged=1',
|
|
14
|
+
});
|
|
15
|
+
const data = response.data.data;
|
|
16
|
+
|
|
17
|
+
const out = data.map((item) => {
|
|
18
|
+
const title = item[0].title.replace('【微语简报】', '');
|
|
19
|
+
const link = item[0].link;
|
|
20
|
+
const datematch = item[0]._date.match(/datetime="(.*)" itemprop/);
|
|
21
|
+
const date = datematch && datematch[1];
|
|
22
|
+
const description = item[0].content
|
|
23
|
+
.substring(item[0].content.indexOf('【今日简报】') + 6)
|
|
24
|
+
.replace(/(\d*\.\s)|(【)/g, '<br>$1$2')
|
|
25
|
+
.substring(4);
|
|
26
|
+
|
|
27
|
+
const single = {
|
|
28
|
+
title,
|
|
29
|
+
link,
|
|
30
|
+
pubDate: date && timezone(parseDate(date, 'YYYY-M-D H:mm:ss'), +8),
|
|
31
|
+
description,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
return single;
|
|
35
|
+
});
|
|
36
|
+
ctx.state.data = {
|
|
37
|
+
title: '微语简报',
|
|
38
|
+
link: 'https://www.yunspe.com/newsflashes',
|
|
39
|
+
description: '微语简报',
|
|
40
|
+
item: out,
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'yunspe.com': {
|
|
3
|
+
_name: '云奇网',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: '微语简报',
|
|
7
|
+
docs: 'https://docs.rsshub.app/new-media.html#wei-yu-jian-bao',
|
|
8
|
+
source: ['/newsflashes/微语简报', '/newsflashes', '/'],
|
|
9
|
+
target: '/yunspe/newsflashes',
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
},
|
|
13
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
const cheerio = require('cheerio');
|
|
3
|
-
const
|
|
3
|
+
const { parseDate, parseRelativeDate } = require('@/utils/parse-date');
|
|
4
4
|
|
|
5
5
|
module.exports = async (ctx) => {
|
|
6
6
|
const category = ctx.params.category;
|
|
7
|
-
const url = `
|
|
7
|
+
const url = `https://www.yystv.cn/b/${category}`;
|
|
8
8
|
const response = await got({
|
|
9
9
|
method: 'get',
|
|
10
10
|
url,
|
|
@@ -18,8 +18,8 @@ module.exports = async (ctx) => {
|
|
|
18
18
|
.map(function () {
|
|
19
19
|
const info = {
|
|
20
20
|
title: $(this).find('.b-main-info-title').text(),
|
|
21
|
-
link: '
|
|
22
|
-
pubDate:
|
|
21
|
+
link: 'https://www.yystv.cn' + $(this).find('.b-main-info-title a').attr('href'),
|
|
22
|
+
pubDate: parseRelativeDate($(this).find('.b-main-createtime').text()),
|
|
23
23
|
author: $(this).find('.b-author').text(),
|
|
24
24
|
};
|
|
25
25
|
return info;
|
|
@@ -31,8 +31,8 @@ module.exports = async (ctx) => {
|
|
|
31
31
|
.map(function () {
|
|
32
32
|
const info = {
|
|
33
33
|
title: $('.list-article-title', this).text(),
|
|
34
|
-
link: '
|
|
35
|
-
pubDate:
|
|
34
|
+
link: 'https://www.yystv.cn' + $('a', this).attr('href'),
|
|
35
|
+
pubDate: $('.c-999', this).text().includes('-') ? parseDate($('.c-999', this).text()) : parseRelativeDate($('.c-999', this).text()),
|
|
36
36
|
author: $('.handler-author-link', this).text(),
|
|
37
37
|
};
|
|
38
38
|
return info;
|
|
@@ -49,7 +49,7 @@ module.exports = async (ctx) => {
|
|
|
49
49
|
method: 'get',
|
|
50
50
|
});
|
|
51
51
|
const $ = cheerio.load(r.data);
|
|
52
|
-
return $('.doc-content
|
|
52
|
+
return $('.doc-content.rel').html();
|
|
53
53
|
});
|
|
54
54
|
return currentValue;
|
|
55
55
|
})
|
|
@@ -58,7 +58,7 @@ module.exports = async (ctx) => {
|
|
|
58
58
|
await getDescription(items).then(() => {
|
|
59
59
|
ctx.state.data = {
|
|
60
60
|
title: '游研社-' + $('title').text(),
|
|
61
|
-
link: `
|
|
61
|
+
link: `https://www.yystv.cn/b/${category}`,
|
|
62
62
|
item: items,
|
|
63
63
|
};
|
|
64
64
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
const cheerio = require('cheerio');
|
|
3
|
-
const
|
|
3
|
+
const { parseRelativeDate } = require('@/utils/parse-date');
|
|
4
4
|
|
|
5
5
|
module.exports = async (ctx) => {
|
|
6
6
|
const url = `https://www.yystv.cn/docs`;
|
|
@@ -18,7 +18,7 @@ module.exports = async (ctx) => {
|
|
|
18
18
|
const info = {
|
|
19
19
|
title: $('.list-article-title', this).text(),
|
|
20
20
|
link: 'https://www.yystv.cn' + $('a', this).attr('href'),
|
|
21
|
-
pubDate:
|
|
21
|
+
pubDate: parseRelativeDate($('.c-999', this).text()),
|
|
22
22
|
author: $('.handler-author-link', this).text(),
|
|
23
23
|
description: $('.list-article-intro', this).text(),
|
|
24
24
|
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'yystv.cn': {
|
|
3
|
+
_name: '游研社',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: '推游',
|
|
7
|
+
docs: 'https://docs.rsshub.app/game.html#you-yan-she',
|
|
8
|
+
source: '/b/recommend',
|
|
9
|
+
target: '/yystv/category/recommend',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
title: '游戏史',
|
|
13
|
+
docs: 'https://docs.rsshub.app/game.html#you-yan-she',
|
|
14
|
+
source: '/b/history',
|
|
15
|
+
target: '/yystv/category/history',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: '大事件',
|
|
19
|
+
docs: 'https://docs.rsshub.app/game.html#you-yan-she',
|
|
20
|
+
source: '/b/big',
|
|
21
|
+
target: '/yystv/category/big',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
title: '文化',
|
|
25
|
+
docs: 'https://docs.rsshub.app/game.html#you-yan-she',
|
|
26
|
+
source: '/b/culture',
|
|
27
|
+
target: '/yystv/category/culture',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
title: '趣闻',
|
|
31
|
+
docs: 'https://docs.rsshub.app/game.html#you-yan-she',
|
|
32
|
+
source: '/b/news',
|
|
33
|
+
target: '/yystv/category/news',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
title: '经典回顾',
|
|
37
|
+
docs: 'https://docs.rsshub.app/game.html#you-yan-she',
|
|
38
|
+
source: '/b/retro',
|
|
39
|
+
target: '/yystv/category/retro',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
title: '全部文章',
|
|
43
|
+
docs: 'https://docs.rsshub.app/game.html#you-yan-she',
|
|
44
|
+
source: '/docs',
|
|
45
|
+
target: '/yystv/docs',
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
};
|
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
|
|
5
|
+
const rootUrl = 'http://www.career.zju.edu.cn';
|
|
3
6
|
const host = 'http://www.career.zju.edu.cn/jyxt/jygz/new/getContent.zf?minCount=0&maxCount=10&';
|
|
4
7
|
|
|
5
8
|
const map = new Map([
|
|
6
|
-
[1, { title: '浙大就业服务平台 -- 新闻动态', id: 'lmjdid=739BEBB72A072B25E0538713470A6C41&sjlmid=undefined&lmtype=2&lx=2
|
|
7
|
-
[2, { title: '浙大就业服务平台 -- 活动通知', id: 'lmjdid=739BEBB72A0B2B25E0538713470A6C41&sjlmid=undefined&lmtype=2&lx=2
|
|
8
|
-
[3, { title: '浙大就业服务平台 -- 学院动态', id: 'lmjdid=739BEBB72A0C2B25E0538713470A6C41&sjlmid=undefined&lmtype=2&lx=2
|
|
9
|
-
[4, { title: '浙大就业服务平台 -- 告示通告', id: 'lmjdid=739BEBB72A252B25E0538713470A6C41&sjlmid=undefined&lmtype=2&lx=2
|
|
9
|
+
[1, { title: '浙大就业服务平台 -- 新闻动态', id: 'lmjdid=739BEBB72A072B25E0538713470A6C41&sjlmid=undefined&lmtype=2&lx=2' }],
|
|
10
|
+
[2, { title: '浙大就业服务平台 -- 活动通知', id: 'lmjdid=739BEBB72A0B2B25E0538713470A6C41&sjlmid=undefined&lmtype=2&lx=2' }],
|
|
11
|
+
[3, { title: '浙大就业服务平台 -- 学院动态', id: 'lmjdid=739BEBB72A0C2B25E0538713470A6C41&sjlmid=undefined&lmtype=2&lx=2' }],
|
|
12
|
+
[4, { title: '浙大就业服务平台 -- 告示通告', id: 'lmjdid=739BEBB72A252B25E0538713470A6C41&sjlmid=undefined&lmtype=2&lx=2' }],
|
|
10
13
|
]);
|
|
11
14
|
|
|
12
15
|
module.exports = async (ctx) => {
|
|
13
|
-
const type =
|
|
16
|
+
const type = parseInt(ctx.params.type);
|
|
14
17
|
const id = map.get(type).id;
|
|
15
|
-
const res = await got({
|
|
16
|
-
method: 'get',
|
|
17
|
-
url: `${host}${id}`,
|
|
18
|
-
});
|
|
18
|
+
const res = await got(`${host}${id}`);
|
|
19
19
|
|
|
20
20
|
const $ = cheerio.load(res.data);
|
|
21
|
-
const list = $('.com-list
|
|
21
|
+
const list = $('.com-list li');
|
|
22
22
|
const items =
|
|
23
23
|
list &&
|
|
24
24
|
list
|
|
25
25
|
.map((index, item) => {
|
|
26
26
|
item = $(item);
|
|
27
|
+
const link = item.find('a').eq(0);
|
|
27
28
|
return {
|
|
28
29
|
// title: item.find('a').attr('title'),
|
|
29
|
-
title: item.find('
|
|
30
|
-
pubDate:
|
|
30
|
+
title: item.find('span').eq(0).attr('title'),
|
|
31
|
+
pubDate: parseDate(item.find('.news-time').text()),
|
|
31
32
|
|
|
32
|
-
link:
|
|
33
|
+
link: link.attr('href').startsWith('http') ? link.attr('href') : `${rootUrl}/jyxt${link.attr('data-src')}xwid=${link.attr('data-xwid')}&lmtype=${link.attr('data-lmtype')}`,
|
|
33
34
|
};
|
|
34
35
|
})
|
|
35
36
|
.get();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
3
4
|
|
|
4
5
|
async function getPage(id) {
|
|
5
6
|
const res = await got({
|
|
@@ -16,7 +17,7 @@ async function getPage(id) {
|
|
|
16
17
|
item = $(item);
|
|
17
18
|
|
|
18
19
|
const title = item.find('a').text();
|
|
19
|
-
const pubDate =
|
|
20
|
+
const pubDate = parseDate(item.find('.fr').text());
|
|
20
21
|
const link = item.find('a').attr('href');
|
|
21
22
|
|
|
22
23
|
return {
|