rsshub 1.0.0-master.e6d4e1e → 1.0.0-master.e6d53dc
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/api/radar/rules/all.ts +3 -6
- package/lib/api/radar/rules/one.ts +3 -6
- package/lib/config.ts +12 -22
- package/lib/errors/index.tsx +1 -1
- package/lib/index.ts +1 -1
- package/lib/middleware/anti-hotlink.test.ts +191 -6
- package/lib/middleware/anti-hotlink.ts +28 -0
- package/lib/middleware/parameter.test.ts +22 -5
- package/lib/middleware/parameter.ts +47 -17
- package/lib/registry.test.ts +8 -0
- package/lib/registry.ts +2 -0
- package/lib/router.js +0 -3
- package/lib/routes/141jav/index.ts +25 -21
- package/lib/routes/141ppv/index.ts +24 -20
- package/lib/routes/51read/article.ts +82 -0
- package/lib/routes/51read/namespace.ts +6 -0
- package/lib/routes/5eplay/utils.ts +5 -3
- package/lib/routes/agri/index.ts +307 -0
- package/lib/routes/agri/namespace.ts +8 -0
- package/lib/routes/agri/templates/description.art +21 -0
- package/lib/routes/aljazeera/index.ts +2 -2
- package/lib/routes/apnews/sitemap.ts +98 -0
- package/lib/routes/apnews/utils.ts +7 -5
- package/lib/routes/autocentre/index.ts +29 -0
- package/lib/routes/autocentre/namespace.ts +7 -0
- package/lib/routes/bilibili/api-interface.d.ts +1 -0
- package/lib/routes/bilibili/cache.ts +3 -1
- package/lib/routes/bilibili/dynamic.ts +7 -9
- package/lib/routes/binance/announcement.ts +168 -0
- package/lib/routes/binance/types.ts +26 -0
- package/lib/routes/bing/daily-wallpaper.ts +1 -1
- package/lib/routes/bjnews/cat.ts +43 -0
- package/lib/routes/bjnews/column.ts +43 -0
- package/lib/routes/bjnews/namespace.ts +6 -0
- package/lib/routes/bjnews/utils.ts +19 -0
- package/lib/routes/bjx/fd.ts +35 -26
- package/lib/routes/buaa/jiaowu.ts +1 -1
- package/lib/routes/buaa/lib/space/newbook.ts +171 -0
- package/lib/routes/buaa/lib/space/templates/newbook.art +44 -0
- package/lib/routes/cccfna/index.ts +2 -2
- package/lib/routes/cctv/category.ts +16 -12
- package/lib/routes/cctv/xwlb.ts +32 -10
- package/lib/routes/cdu/jwgg.ts +79 -0
- package/lib/routes/cdu/namespace.ts +6 -0
- package/lib/routes/cffex/announcement.ts +73 -0
- package/lib/routes/cffex/namespace.ts +6 -0
- package/lib/routes/chlinlearn/daily-blog.ts +55 -0
- package/lib/routes/chlinlearn/namespcae.ts +6 -0
- package/lib/routes/copymanga/comic.ts +3 -1
- package/lib/routes/devolverdigital/blog.ts +59 -42
- package/lib/routes/digitalcameraworld/news.ts +1 -1
- package/lib/routes/discord/channel.ts +10 -10
- package/lib/routes/discord/discord-api.ts +27 -32
- package/lib/routes/discord/templates/message.art +15 -0
- package/lib/routes/discourse/notifications.ts +2 -1
- package/lib/routes/dongqiudi/result.ts +1 -1
- package/lib/routes/eastmoney/report/index.ts +63 -15
- package/lib/routes/eastmoney/templates/stock_description.art +36 -0
- package/lib/routes/eastmoney/utils.ts +35 -0
- package/lib/routes/fediverse/timeline.ts +35 -18
- package/lib/routes/flashcat/blog.ts +61 -0
- package/lib/routes/flashcat/namespace.ts +6 -0
- package/lib/routes/ftm/index.ts +60 -0
- package/lib/routes/ftm/namespace.ts +6 -0
- package/lib/routes/galxe/index.ts +94 -0
- package/lib/routes/galxe/namespace.ts +9 -0
- package/lib/routes/gamersky/ent.ts +57 -0
- package/lib/routes/gamersky/namespace.ts +10 -0
- package/lib/routes/gamersky/news.ts +91 -0
- package/lib/routes/gamersky/review.ts +80 -0
- package/lib/routes/gamersky/utils.ts +94 -0
- package/lib/routes/gdut/oa-news.ts +12 -17
- package/lib/routes/gisreportsonline/index.ts +60 -0
- package/lib/routes/gisreportsonline/namespace.ts +6 -0
- package/lib/routes/github/activity.ts +4 -3
- package/lib/routes/github/search.ts +20 -18
- package/lib/routes/google/research.ts +45 -0
- package/lib/routes/gov/cbirc/index.ts +371 -0
- package/lib/routes/gov/chongqing/sydwgkzp.ts +4 -4
- package/lib/routes/gov/lswz/index.ts +289 -0
- package/lib/routes/gov/zj/ningbogzw-notice.ts +50 -0
- package/lib/routes/gov/zj/ningborsjnotice.ts +50 -0
- package/lib/routes/gq/news.ts +1 -1
- package/lib/routes/gs/developer/blog.ts +58 -0
- package/lib/routes/gs/namespace.ts +9 -0
- package/lib/routes/healthz.ts +8 -0
- package/lib/routes/hket/index.ts +80 -76
- package/lib/routes/hottoys/index.ts +63 -0
- package/lib/routes/hottoys/namespace.ts +6 -0
- package/lib/routes/hust/gs.ts +281 -0
- package/lib/routes/hust/namespace.ts +1 -1
- package/lib/routes/imhcg/blog.ts +47 -0
- package/lib/routes/imhcg/namespace.ts +7 -0
- package/lib/routes/imop/namespace.ts +10 -0
- package/lib/routes/imop/tianshu.ts +53 -0
- package/lib/routes/infzm/hot.ts +39 -0
- package/lib/routes/infzm/index.ts +3 -30
- package/lib/routes/infzm/utils.ts +34 -0
- package/lib/routes/inspirehep/author.ts +46 -0
- package/lib/routes/inspirehep/literature.ts +42 -0
- package/lib/routes/inspirehep/namespace.ts +7 -0
- package/lib/routes/inspirehep/types.ts +210 -0
- package/lib/routes/inspirehep/utils.ts +15 -0
- package/lib/routes/iwara/subscriptions.ts +1 -1
- package/lib/routes/javdb/actors.ts +6 -2
- package/lib/routes/joins/chinese.ts +218 -0
- package/lib/routes/joins/namespace.ts +8 -0
- package/lib/routes/joins/templates/description.art +17 -0
- package/lib/routes/juejin/dynamic.ts +114 -0
- package/lib/routes/kaopu/news.ts +3 -3
- package/lib/routes/kemono/index.ts +21 -0
- package/lib/routes/keylol/index.ts +56 -11
- package/lib/routes/kurogames/namespace.ts +7 -0
- package/lib/routes/kurogames/wutheringwaves/news.ts +59 -0
- package/lib/routes/link3/events.ts +86 -0
- package/lib/routes/link3/namespace.ts +6 -0
- package/lib/routes/link3/profile.ts +143 -0
- package/lib/routes/linkedin/cn/renderer.ts +1 -1
- package/lib/routes/lmu/jobs.ts +96 -0
- package/lib/routes/lmu/namespace.ts +17 -0
- package/lib/routes/lmu/templates/jobPosting.art +11 -0
- package/lib/routes/mcmod/index.ts +105 -0
- package/lib/routes/mcmod/namespace.ts +6 -0
- package/lib/routes/mcmod/templates/mod.art +13 -0
- package/lib/routes/misskey/user-timeline.ts +42 -0
- package/lib/routes/misskey/utils.ts +41 -1
- package/lib/routes/nationalgeographic/latest-stories.ts +1 -1
- package/lib/routes/nationalgeographic/templates/stories.art +1 -1
- package/lib/routes/newyorker/news.ts +24 -17
- package/lib/routes/oschina/news.ts +2 -0
- package/lib/routes/people/index.ts +4 -2
- package/lib/routes/picnob/user.ts +11 -3
- package/lib/routes/pixiv/search.ts +20 -1
- package/lib/routes/pixiv/utils.ts +3 -3
- package/lib/routes/psyche/topic.ts +1 -1
- package/lib/routes/psyche/type.ts +1 -1
- package/lib/routes/psyche/utils.ts +1 -1
- package/lib/routes/questn/community.ts +76 -0
- package/lib/routes/questn/events.ts +101 -0
- package/lib/routes/questn/namespace.ts +6 -0
- package/lib/routes/questn/util.ts +16 -0
- package/lib/routes/rebase/geekdaily.ts +35 -0
- package/lib/routes/rebase/namespace.ts +6 -0
- package/lib/routes/rss3/index.ts +22 -13
- package/lib/routes/rss3/interfaces/metadata.ts +67 -0
- package/lib/routes/rsshub/routes.ts +18 -12
- package/lib/routes/samd/news.ts +1 -1
- package/lib/routes/sara/index.ts +1 -1
- package/lib/routes/scut/gzic/media.ts +71 -0
- package/lib/routes/scut/gzic/news.ts +65 -0
- package/lib/routes/scut/gzic/notice.ts +88 -0
- package/lib/routes/shiep/config.ts +4 -10
- package/lib/routes/shiep/index.ts +9 -9
- package/lib/routes/showstart/artist.ts +5 -4
- package/lib/routes/showstart/brand.ts +5 -4
- package/lib/routes/showstart/event.ts +8 -7
- package/lib/routes/showstart/search.ts +43 -9
- package/lib/routes/showstart/service.ts +81 -53
- package/lib/routes/showstart/site.ts +41 -0
- package/lib/routes/showstart/utils.ts +9 -8
- package/lib/routes/sis001/author.ts +52 -0
- package/lib/routes/sis001/common.ts +38 -0
- package/lib/routes/sis001/forum.ts +2 -29
- package/lib/routes/sjtu/jwc.ts +4 -1
- package/lib/routes/sjtu/namespace.ts +1 -1
- package/lib/routes/sjtu/seiee/index.ts +97 -0
- package/lib/routes/smzdm/product.ts +86 -0
- package/lib/routes/spotify/show.ts +1 -1
- package/lib/routes/springer/journal.ts +10 -12
- package/lib/routes/sse/sselawsrules.ts +370 -0
- package/lib/routes/sspai/author.ts +1 -1
- package/lib/routes/sspai/column.ts +1 -1
- package/lib/routes/sspai/index.ts +1 -1
- package/lib/routes/sspai/matrix.ts +1 -1
- package/lib/routes/sspai/series-update.ts +1 -1
- package/lib/routes/sspai/tag.ts +1 -1
- package/lib/routes/sspai/topic.ts +1 -1
- package/lib/routes/sustainabilitymag/articles.ts +2 -0
- package/lib/routes/szse/rule.ts +315 -42
- package/lib/routes/t66y/index.ts +29 -7
- package/lib/routes/taoguba/blog.ts +1 -1
- package/lib/routes/taoguba/index.ts +1 -1
- package/lib/routes/techcrunch/news.ts +20 -29
- package/lib/routes/techcrunch/templates/description.art +7 -0
- package/lib/routes/telegram/channel.ts +34 -1
- package/lib/routes/test/index.ts +50 -43
- package/lib/routes/the/index.ts +210 -0
- package/lib/routes/the/namespace.ts +8 -0
- package/lib/routes/the/templates/description.art +27 -0
- package/lib/routes/the/util.ts +307 -0
- package/lib/routes/theblockbeats/index.ts +10 -5
- package/lib/routes/towardsdatascience/latest.ts +67 -0
- package/lib/routes/towardsdatascience/namespace.ts +6 -0
- package/lib/routes/tvb/news.ts +1 -0
- package/lib/routes/twitter/api/index.ts +2 -0
- package/lib/routes/twitter/api/web-api/api.ts +18 -0
- package/lib/routes/twitter/api/web-api/constants.ts +2 -0
- package/lib/routes/twitter/api/web-api/login.ts +66 -0
- package/lib/routes/twitter/api/web-api/utils.ts +53 -27
- package/lib/routes/twitter/home-latest.ts +60 -0
- package/lib/routes/twitter/home.ts +1 -1
- package/lib/routes/twitter/user.ts +1 -1
- package/lib/routes/twitter/utils.ts +4 -1
- package/lib/routes/uber/blog.ts +1 -1
- package/lib/routes/ustc/scms.ts +97 -0
- package/lib/routes/v2ex/xna.ts +55 -0
- package/lib/routes/wchscu/namespace.ts +6 -0
- package/lib/routes/wchscu/recruit.ts +73 -0
- package/lib/routes/xiaohongshu/notes.ts +10 -2
- package/lib/routes/xiaohongshu/user.ts +23 -2
- package/lib/routes/xidian/cs.ts +143 -0
- package/lib/routes/xidian/gr.ts +289 -0
- package/lib/routes/xidian/jwc.ts +1 -0
- package/lib/routes/xidian/namespace.ts +1 -1
- package/lib/routes/yahoo/news/index.ts +1 -0
- package/lib/routes/yahoo/news/listid.ts +67 -0
- package/lib/routes/yahoo/news/utils.ts +8 -2
- package/lib/routes/yicai/carousel.ts +48 -0
- package/lib/routes/yicai/utils.ts +23 -17
- package/lib/routes/youtube/subscriptions.ts +1 -0
- package/lib/routes/yystv/docs.ts +28 -19
- package/lib/routes/zhihu/answers.ts +5 -1
- package/lib/routes/zhihu/execlib/x-zse-96-v3.ts +2 -0
- package/lib/routes/zhihu/namespace.ts +3 -0
- package/lib/routes/zhihu/utils.ts +15 -2
- package/lib/routes/zsxq/types.ts +9 -0
- package/lib/routes/zsxq/utils.ts +4 -3
- package/lib/setup.test.ts +1 -1
- package/lib/types.ts +6 -0
- package/lib/utils/cache/index.ts +8 -0
- package/lib/utils/camelcase-keys.spec.ts +127 -0
- package/lib/utils/camelcase-keys.ts +27 -0
- package/lib/utils/common-utils.ts +1 -0
- package/lib/views/error.tsx +3 -3
- package/lib/views/index.tsx +4 -3
- package/lib/views/layout.tsx +1 -1
- package/package.json +46 -44
- package/lib/routes/sse/lawandrules.ts +0 -68
- package/lib/routes-deprecated/bjnews/news.js +0 -44
- package/lib/routes-deprecated/gamersky/ent.js +0 -89
- package/lib/routes-deprecated/gamersky/news.js +0 -34
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import { Route } from '@/types';
|
|
2
|
+
|
|
3
|
+
import cache from '@/utils/cache';
|
|
4
|
+
import got from '@/utils/got';
|
|
5
|
+
import { load } from 'cheerio';
|
|
6
|
+
import timezone from '@/utils/timezone';
|
|
7
|
+
import { parseDate } from '@/utils/parse-date';
|
|
8
|
+
|
|
9
|
+
export const handler = async (ctx) => {
|
|
10
|
+
const { category = 'html/xinwen/index' } = ctx.req.param();
|
|
11
|
+
const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 25;
|
|
12
|
+
|
|
13
|
+
const rootUrl = 'https://www.lswz.gov.cn';
|
|
14
|
+
const currentUrl = new URL(`${category}.shtml`, rootUrl).href;
|
|
15
|
+
|
|
16
|
+
const { data: response } = await got(currentUrl);
|
|
17
|
+
|
|
18
|
+
const $ = load(response);
|
|
19
|
+
|
|
20
|
+
const language = $('html').prop('lang');
|
|
21
|
+
|
|
22
|
+
let items = $('ul.lists li')
|
|
23
|
+
.slice(0, limit)
|
|
24
|
+
.toArray()
|
|
25
|
+
.map((item) => {
|
|
26
|
+
item = $(item);
|
|
27
|
+
|
|
28
|
+
return {
|
|
29
|
+
title: item.find('a').text(),
|
|
30
|
+
pubDate: parseDate(item.find('span').text()),
|
|
31
|
+
link: new URL(item.find('a').prop('href'), rootUrl).href,
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
items = await Promise.all(
|
|
36
|
+
items.map((item) =>
|
|
37
|
+
cache.tryGet(item.link, async () => {
|
|
38
|
+
const { data: detailResponse } = await got(item.link);
|
|
39
|
+
|
|
40
|
+
const $$ = load(detailResponse);
|
|
41
|
+
|
|
42
|
+
$$('ul.lists').remove();
|
|
43
|
+
$$('div.pub-right-source, div.detail_links_pane').remove();
|
|
44
|
+
|
|
45
|
+
const title = $$('meta[name="ArticleTitle"]').prop('content') || $$('div.pub-det-title').text();
|
|
46
|
+
const description = $$('table.pages_content, div.article-content, div.TRS_UEDITOR, div.TRS_PreAppend').html();
|
|
47
|
+
const pubDate = $$('meta[name="PubDate"]').prop('content');
|
|
48
|
+
|
|
49
|
+
item.title = title || item.title;
|
|
50
|
+
item.description = description;
|
|
51
|
+
item.pubDate = pubDate ? timezone(parseDate(pubDate), +8) : item.pubDate;
|
|
52
|
+
item.author = $$('meta[name="ContentSource"]').prop('content')?.trim() ?? undefined;
|
|
53
|
+
item.content = {
|
|
54
|
+
html: description,
|
|
55
|
+
text: $$('table.pages_content, div.article-content, div.TRS_UEDITOR, div.TRS_PreAppend').text(),
|
|
56
|
+
};
|
|
57
|
+
item.language = language;
|
|
58
|
+
|
|
59
|
+
return item;
|
|
60
|
+
})
|
|
61
|
+
)
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
const image = new URL($('div.lsj-index-logo img').prop('src'), rootUrl).href;
|
|
65
|
+
|
|
66
|
+
return {
|
|
67
|
+
title: $('title').text(),
|
|
68
|
+
description: $('meta[name="ColumnDescription"]').prop('content'),
|
|
69
|
+
link: currentUrl,
|
|
70
|
+
item: items,
|
|
71
|
+
allowEmpty: true,
|
|
72
|
+
image,
|
|
73
|
+
author: $('meta[name="SiteName"]').prop('content'),
|
|
74
|
+
language,
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export const route: Route = {
|
|
79
|
+
path: '/lswz/:category{.+}?',
|
|
80
|
+
name: '国家粮食和物资储备局',
|
|
81
|
+
url: 'lswz.gov.cn',
|
|
82
|
+
maintainers: ['nczitzk'],
|
|
83
|
+
handler,
|
|
84
|
+
example: '/gov/lswz',
|
|
85
|
+
parameters: { category: '分类,默认为 `html/xinwen/index`,可在对应分类页 URL 中找到' },
|
|
86
|
+
description: `:::tip
|
|
87
|
+
若订阅 [新闻发布](https://www.lswz.gov.cn/html/xinwen/index.shtml),网址为 \`https://www.lswz.gov.cn/html/xinwen/index.shtml\`。截取 \`https://www.lswz.gov.cn/\` 到末尾 \`.shtml\` 的部分 \`html/xinwen/index\` 作为参数填入,此时路由为 [\`/gov/lswz/html/xinwen/index\`](https://rsshub.app/gov/lswz/html/xinwen/index)。
|
|
88
|
+
:::
|
|
89
|
+
|
|
90
|
+
| [新闻发布](https://www.lswz.gov.cn/html/xinwen/index.shtml) | [党建工作](https://www.lswz.gov.cn/html/djgz/index.shtml) |
|
|
91
|
+
| ------------------------------------------------------------------ | -------------------------------------------------------------- |
|
|
92
|
+
| [html/xinwen/index](https://rsshub.app/gov/lswz/html/xinwen/index) | [html/djgz/index](https://rsshub.app/gov/lswz/html/djgz/index) |
|
|
93
|
+
|
|
94
|
+
| [粮食交易](https://www.lswz.gov.cn/html/zmhd/lysj/lsjy.shtml) | [粮食质量](https://www.lswz.gov.cn/html/zmhd/lysj/lszl.shtml) |
|
|
95
|
+
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
|
96
|
+
| [html/zmhd/lysj/lsjy](https://rsshub.app/gov/lswz/html/zmhd/lysj/lsjy) | [html/zmhd/lysj/lszl](https://rsshub.app/gov/lswz/html/zmhd/lysj/lszl) |
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
#### [业务频道](https://www.lswz.gov.cn/html/ywpd/index.shtml)
|
|
100
|
+
|
|
101
|
+
| [粮食调控](https://www.lswz.gov.cn/html/ywpd/lstk/index.shtml) | [物资储备](https://www.lswz.gov.cn/html/ywpd/wzcb/index.shtml) | [能源储备](https://www.lswz.gov.cn/html/ywpd/nycb/index.shtml) | [安全应急](https://www.lswz.gov.cn/html/ywpd/aqyj/index.shtml) | [法规体改](https://www.lswz.gov.cn/html/ywpd/fgtg/index.shtml) |
|
|
102
|
+
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
|
|
103
|
+
| [html/ywpd/lstk/index](https://rsshub.app/gov/lswz/html/ywpd/lstk/index) | [html/ywpd/wzcb/index](https://rsshub.app/gov/lswz/html/ywpd/wzcb/index) | [html/ywpd/nycb/index](https://rsshub.app/gov/lswz/html/ywpd/nycb/index) | [html/ywpd/aqyj/index](https://rsshub.app/gov/lswz/html/ywpd/aqyj/index) | [html/ywpd/fgtg/index](https://rsshub.app/gov/lswz/html/ywpd/fgtg/index) |
|
|
104
|
+
|
|
105
|
+
| [规划建设](https://www.lswz.gov.cn/html/ywpd/gjks/index.shtml) | [财务审计](https://www.lswz.gov.cn/html/ywpd/cwsj/index.shtml) | [仓储科技](https://www.lswz.gov.cn/html/ywpd/cckj/index.shtml) | [执法督查](https://www.lswz.gov.cn/html/ywpd/zfdc/index.shtml) | [国际交流](https://www.lswz.gov.cn/html/ywpd/gjjl/index.shtml) |
|
|
106
|
+
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
|
|
107
|
+
| [html/ywpd/gjks/index](https://rsshub.app/gov/lswz/html/ywpd/gjks/index) | [html/ywpd/cwsj/index](https://rsshub.app/gov/lswz/html/ywpd/cwsj/index) | [html/ywpd/cckj/index](https://rsshub.app/gov/lswz/html/ywpd/cckj/index) | [html/ywpd/zfdc/index](https://rsshub.app/gov/lswz/html/ywpd/zfdc/index) | [html/ywpd/gjjl/index](https://rsshub.app/gov/lswz/html/ywpd/gjjl/index) |
|
|
108
|
+
|
|
109
|
+
| [人事人才](https://www.lswz.gov.cn/html/ywpd/rsrc/index.shtml) | [标准质量](https://www.lswz.gov.cn/html/ywpd/bzzl/index.shtml) | [粮食和储备研究](https://www.lswz.gov.cn/html/ywpd/lshcbyj/index.shtml) |
|
|
110
|
+
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
|
|
111
|
+
| [html/ywpd/rsrc/index](https://rsshub.app/gov/lswz/html/ywpd/rsrc/index) | [html/ywpd/bzzl/index](https://rsshub.app/gov/lswz/html/ywpd/bzzl/index) | [html/ywpd/lshcbyj/index](https://rsshub.app/gov/lswz/html/ywpd/lshcbyj/index) |
|
|
112
|
+
|
|
113
|
+
#### [政策发布](https://www.lswz.gov.cn/html/zcfb/index.shtml)
|
|
114
|
+
|
|
115
|
+
| [文件](https://www.lswz.gov.cn/html/zcfb/wenjian.shtml) | [法律法规](https://www.lswz.gov.cn/html/zcfb/fggz-fg.shtml) | [规章](https://www.lswz.gov.cn/html/zcfb/fggz-gz.shtml) |
|
|
116
|
+
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
|
117
|
+
| [html/zcfb/wenjian](https://rsshub.app/gov/lswz/html/zcfb/wenjian) | [html/zcfb/fggz-fg](https://rsshub.app/gov/lswz/html/zcfb/fggz-fg) | [html/zcfb/fggz-gz](https://rsshub.app/gov/lswz/html/zcfb/fggz-gz) |
|
|
118
|
+
|
|
119
|
+
#### [通知公告](https://www.lswz.gov.cn/html/tzgg/index.shtml)
|
|
120
|
+
|
|
121
|
+
| [行政通知](https://www.lswz.gov.cn/html/tzgg/xztz.shtml) | [公告通告](https://www.lswz.gov.cn/html/tzgg/ggtg.shtml) |
|
|
122
|
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
|
123
|
+
| [html/tzgg/xztz](https://rsshub.app/gov/lswz/html/tzgg/xztz) | [html/tzgg/ggtg](https://rsshub.app/gov/lswz/html/tzgg/ggtg) |
|
|
124
|
+
|
|
125
|
+
#### [粮食收购](https://www.lswz.gov.cn/html/zmhd/lysj/lssg-szym.shtml)
|
|
126
|
+
|
|
127
|
+
| [收购数据](https://www.lswz.gov.cn/html/zmhd/lysj/lssg-szym.shtml) | [政策·解读](https://www.lswz.gov.cn/html/zmhd/lysj/lssg-gzdt.shtml) |
|
|
128
|
+
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
129
|
+
| [html/zmhd/lysj/lssg-szym](https://rsshub.app/gov/lswz/html/zmhd/lysj/lssg-szym) | [html/zmhd/lysj/lssg-gzdt](https://rsshub.app/gov/lswz/html/zmhd/lysj/lssg-gzdt) |
|
|
130
|
+
|
|
131
|
+
#### [粮食价格](https://www.lswz.gov.cn/html/zmhd/lysj/lsjg-scjc.shtml)
|
|
132
|
+
|
|
133
|
+
| [市场监测](https://www.lswz.gov.cn/html/zmhd/lysj/lsjg-scjc.shtml) | [市场价格](https://www.lswz.gov.cn/html/zmhd/lysj/lsjg-scjg.shtml) |
|
|
134
|
+
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
135
|
+
| [html/zmhd/lysj/lsjg-scjc](https://rsshub.app/gov/lswz/html/zmhd/lysj/lsjg-scjc) | [html/zmhd/lysj/lsjg-scjg](https://rsshub.app/gov/lswz/html/zmhd/lysj/lsjg-scjg) |
|
|
136
|
+
|
|
137
|
+
`,
|
|
138
|
+
categories: ['government'],
|
|
139
|
+
|
|
140
|
+
features: {
|
|
141
|
+
requireConfig: false,
|
|
142
|
+
requirePuppeteer: false,
|
|
143
|
+
antiCrawler: false,
|
|
144
|
+
supportRadar: true,
|
|
145
|
+
supportBT: false,
|
|
146
|
+
supportPodcast: false,
|
|
147
|
+
supportScihub: false,
|
|
148
|
+
},
|
|
149
|
+
radar: [
|
|
150
|
+
{
|
|
151
|
+
source: ['www.lswz.gov.cn/:category?'],
|
|
152
|
+
target: (params) => {
|
|
153
|
+
const category = params.category;
|
|
154
|
+
|
|
155
|
+
return `/gov/lswz${category ? `/${category}` : ''}`;
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
title: '新闻发布',
|
|
160
|
+
source: ['www.lswz.gov.cn/html/xinwen/index.shtml'],
|
|
161
|
+
target: '/lswz/html/xinwen/index',
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
title: '党建工作',
|
|
165
|
+
source: ['www.lswz.gov.cn/html/djgz/index.shtml'],
|
|
166
|
+
target: '/lswz/html/djgz/index',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
title: '业务频道 - 粮食调控',
|
|
170
|
+
source: ['www.lswz.gov.cn/html/ywpd/lstk/index.shtml'],
|
|
171
|
+
target: '/lswz/html/ywpd/lstk/index',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
title: '业务频道 - 物资储备',
|
|
175
|
+
source: ['www.lswz.gov.cn/html/ywpd/wzcb/index.shtml'],
|
|
176
|
+
target: '/lswz/html/ywpd/wzcb/index',
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
title: '业务频道 - 能源储备',
|
|
180
|
+
source: ['www.lswz.gov.cn/html/ywpd/nycb/index.shtml'],
|
|
181
|
+
target: '/lswz/html/ywpd/nycb/index',
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
title: '业务频道 - 安全应急',
|
|
185
|
+
source: ['www.lswz.gov.cn/html/ywpd/aqyj/index.shtml'],
|
|
186
|
+
target: '/lswz/html/ywpd/aqyj/index',
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
title: '业务频道 - 法规体改',
|
|
190
|
+
source: ['www.lswz.gov.cn/html/ywpd/fgtg/index.shtml'],
|
|
191
|
+
target: '/lswz/html/ywpd/fgtg/index',
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
title: '业务频道 - 规划建设',
|
|
195
|
+
source: ['www.lswz.gov.cn/html/ywpd/gjks/index.shtml'],
|
|
196
|
+
target: '/lswz/html/ywpd/gjks/index',
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
title: '业务频道 - 财务审计',
|
|
200
|
+
source: ['www.lswz.gov.cn/html/ywpd/cwsj/index.shtml'],
|
|
201
|
+
target: '/lswz/html/ywpd/cwsj/index',
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
title: '业务频道 - 仓储科技',
|
|
205
|
+
source: ['www.lswz.gov.cn/html/ywpd/cckj/index.shtml'],
|
|
206
|
+
target: '/lswz/html/ywpd/cckj/index',
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
title: '业务频道 - 执法督查',
|
|
210
|
+
source: ['www.lswz.gov.cn/html/ywpd/zfdc/index.shtml'],
|
|
211
|
+
target: '/lswz/html/ywpd/zfdc/index',
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
title: '业务频道 - 国际交流',
|
|
215
|
+
source: ['www.lswz.gov.cn/html/ywpd/gjjl/index.shtml'],
|
|
216
|
+
target: '/lswz/html/ywpd/gjjl/index',
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
title: '业务频道 - 人事人才',
|
|
220
|
+
source: ['www.lswz.gov.cn/html/ywpd/rsrc/index.shtml'],
|
|
221
|
+
target: '/lswz/html/ywpd/rsrc/index',
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
title: '业务频道 - 标准质量',
|
|
225
|
+
source: ['www.lswz.gov.cn/html/ywpd/bzzl/index.shtml'],
|
|
226
|
+
target: '/lswz/html/ywpd/bzzl/index',
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
title: '业务频道 - 粮食和储备研究',
|
|
230
|
+
source: ['www.lswz.gov.cn/html/ywpd/lshcbyj/index.shtml'],
|
|
231
|
+
target: '/lswz/html/ywpd/lshcbyj/index',
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
title: '政策发布 - 文件',
|
|
235
|
+
source: ['www.lswz.gov.cn/html/zcfb/wenjian.shtml'],
|
|
236
|
+
target: '/lswz/html/zcfb/wenjian',
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
title: '政策发布 - 法律法规',
|
|
240
|
+
source: ['www.lswz.gov.cn/html/zcfb/fggz-fg.shtml'],
|
|
241
|
+
target: '/lswz/html/zcfb/fggz-fg',
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
title: '政策发布 - 规章',
|
|
245
|
+
source: ['www.lswz.gov.cn/html/zcfb/fggz-gz.shtml'],
|
|
246
|
+
target: '/lswz/html/zcfb/fggz-gz',
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
title: '通知公告 - 行政通知',
|
|
250
|
+
source: ['www.lswz.gov.cn/html/tzgg/xztz.shtml'],
|
|
251
|
+
target: '/lswz/html/tzgg/xztz',
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
title: '通知公告 - 公告通告',
|
|
255
|
+
source: ['www.lswz.gov.cn/html/tzgg/ggtg.shtml'],
|
|
256
|
+
target: '/lswz/html/tzgg/ggtg',
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
title: '粮食收购 - 收购数据',
|
|
260
|
+
source: ['www.lswz.gov.cn/html/zmhd/lysj/lssg-szym.shtml'],
|
|
261
|
+
target: '/lswz/html/zmhd/lysj/lssg-szym',
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
title: '粮食收购 - 政策·解读',
|
|
265
|
+
source: ['www.lswz.gov.cn/html/zmhd/lysj/lssg-gzdt.shtml'],
|
|
266
|
+
target: '/lswz/html/zmhd/lysj/lssg-gzdt',
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
title: '粮食价格 - 市场监测',
|
|
270
|
+
source: ['www.lswz.gov.cn/html/zmhd/lysj/lsjg-scjc.shtml'],
|
|
271
|
+
target: '/lswz/html/zmhd/lysj/lsjg-scjc',
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
title: '粮食价格 - 市场价格',
|
|
275
|
+
source: ['www.lswz.gov.cn/html/zmhd/lysj/lsjg-scjg.shtml'],
|
|
276
|
+
target: '/lswz/html/zmhd/lysj/lsjg-scjg',
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
title: '粮食交易',
|
|
280
|
+
source: ['www.lswz.gov.cn/html/zmhd/lysj/lsjy.shtml'],
|
|
281
|
+
target: '/lswz/html/zmhd/lysj/lsjy',
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
title: '粮食质量',
|
|
285
|
+
source: ['www.lswz.gov.cn/html/zmhd/lysj/lszl.shtml'],
|
|
286
|
+
target: '/lswz/html/zmhd/lysj/lszl',
|
|
287
|
+
},
|
|
288
|
+
],
|
|
289
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Route } from '@/types';
|
|
2
|
+
import got from '@/utils/got';
|
|
3
|
+
import { load } from 'cheerio';
|
|
4
|
+
import { parseDate } from '@/utils/parse-date';
|
|
5
|
+
|
|
6
|
+
export const route: Route = {
|
|
7
|
+
path: '/zj/ningbogzw-notice/:colId?',
|
|
8
|
+
categories: ['government'],
|
|
9
|
+
example: '/gov/zj/ningbogzw-notice/1229116730',
|
|
10
|
+
parameters: {
|
|
11
|
+
colId: '公告分类id、详细信息点击源网站http://gzw.ningbo.gov.cn/请求中寻找',
|
|
12
|
+
},
|
|
13
|
+
radar: [
|
|
14
|
+
{
|
|
15
|
+
source: ['gzw.ningbo.gov.cn/col/col1229116730/index.html'],
|
|
16
|
+
target: '/zj/ningbogzw-notice/:colId?',
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
name: '宁波市国资委-公告',
|
|
20
|
+
url: 'gzw.ningbo.gov.cn',
|
|
21
|
+
maintainers: ['HaoyuLee'],
|
|
22
|
+
description: `
|
|
23
|
+
| 公告类别 | colId |
|
|
24
|
+
| ------------ | -- |
|
|
25
|
+
| 首页-市属国企招聘信息-招聘公告 | 1229116730 |
|
|
26
|
+
`,
|
|
27
|
+
async handler(ctx) {
|
|
28
|
+
const { colId = '1229116730' } = ctx.req.param();
|
|
29
|
+
const url = `http://gzw.ningbo.gov.cn/col/col${colId}/index.html`;
|
|
30
|
+
const { data: response } = await got(url);
|
|
31
|
+
const noticeCate = load(response)('.List-topic .text-tag').text().trim();
|
|
32
|
+
const reg = /<li><a href=".*" target="_blank">.*<\/li>/g;
|
|
33
|
+
const item = response.match(reg).map((line) => {
|
|
34
|
+
const $ = load(line);
|
|
35
|
+
const title = $('a');
|
|
36
|
+
return {
|
|
37
|
+
title: `宁波市国资委-${noticeCate}:${title.text()}`,
|
|
38
|
+
link: `http://gzw.ningbo.gov.cn${title.attr('href')}`,
|
|
39
|
+
pubDate: parseDate($('p').text().replaceAll(/\[|]/g, '')),
|
|
40
|
+
author: '宁波市国资委',
|
|
41
|
+
description: title.text(),
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
return {
|
|
45
|
+
title: '宁波市国资委',
|
|
46
|
+
link: url,
|
|
47
|
+
item,
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Route } from '@/types';
|
|
2
|
+
import got from '@/utils/got';
|
|
3
|
+
import { load } from 'cheerio';
|
|
4
|
+
import { parseDate } from '@/utils/parse-date';
|
|
5
|
+
|
|
6
|
+
export const route: Route = {
|
|
7
|
+
path: '/zj/ningborsjnotice/:colId?',
|
|
8
|
+
categories: ['government'],
|
|
9
|
+
example: '/gov/zj/ningborsjnotice/1229676740',
|
|
10
|
+
parameters: {
|
|
11
|
+
colId: '公告分类id、详细信息点击源网站http://rsj.ningbo.gov.cn/请求中寻找',
|
|
12
|
+
},
|
|
13
|
+
radar: [
|
|
14
|
+
{
|
|
15
|
+
source: ['rsj.ningbo.gov.cn/col/col1229676740/index.html'],
|
|
16
|
+
target: '/zj/ningborsjnotice/:colId?',
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
name: '宁波市人力资源和社会保障局-公告',
|
|
20
|
+
url: 'rsj.ningbo.gov.cn',
|
|
21
|
+
maintainers: ['HaoyuLee'],
|
|
22
|
+
description: `
|
|
23
|
+
| 公告类别 | colId |
|
|
24
|
+
| ------------ | -- |
|
|
25
|
+
| 事业单位进人公告 | 1229676740 |
|
|
26
|
+
`,
|
|
27
|
+
async handler(ctx) {
|
|
28
|
+
const { colId = '1229676740' } = ctx.req.param();
|
|
29
|
+
const url = `http://rsj.ningbo.gov.cn/col/col${colId}/index.html`;
|
|
30
|
+
const { data: response } = await got(url);
|
|
31
|
+
const noticeCate = load(response)('.titel.bgcolor01').text();
|
|
32
|
+
const reg = /<li class="news_line">.*<\/li>/g;
|
|
33
|
+
const item = response.match(reg).map((line) => {
|
|
34
|
+
const $ = load(line);
|
|
35
|
+
const title = $('.news_titel');
|
|
36
|
+
return {
|
|
37
|
+
title: `宁波人社公告-${noticeCate}:${title.text()}`,
|
|
38
|
+
link: `http://rsj.ningbo.gov.cn${title.attr('href')}`,
|
|
39
|
+
pubDate: parseDate($('.news_date').text().replaceAll(/\[|]/g, '')),
|
|
40
|
+
author: '宁波市人力资源和社会保障局',
|
|
41
|
+
description: title.text(),
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
return {
|
|
45
|
+
title: '宁波市人力资源和社会保障局-公告',
|
|
46
|
+
link: url,
|
|
47
|
+
item,
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
};
|
package/lib/routes/gq/news.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Route } from '@/types';
|
|
|
2
2
|
import cache from '@/utils/cache';
|
|
3
3
|
import parser from '@/utils/rss-parser';
|
|
4
4
|
import { load } from 'cheerio';
|
|
5
|
-
import
|
|
5
|
+
import ofetch from '@/utils/ofetch';
|
|
6
6
|
const host = 'https://www.gq.com';
|
|
7
7
|
export const route: Route = {
|
|
8
8
|
path: '/news',
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Route, Data } from '@/types';
|
|
2
|
+
import ofetch from '@/utils/ofetch';
|
|
3
|
+
import { load } from 'cheerio';
|
|
4
|
+
|
|
5
|
+
export const route: Route = {
|
|
6
|
+
path: '/developer/blog',
|
|
7
|
+
categories: ['blog'],
|
|
8
|
+
example: '/gs/developer/blog',
|
|
9
|
+
parameters: {},
|
|
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: ['developer.gs.com/blog/posts'],
|
|
21
|
+
target: '/developer/blog',
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
name: 'Goldman Sachs Developer Blog',
|
|
25
|
+
zh: {
|
|
26
|
+
name: '高盛开发者博客',
|
|
27
|
+
},
|
|
28
|
+
maintainers: ['chesha1'],
|
|
29
|
+
handler: handlerRoute,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
async function handlerRoute(): Promise<Data> {
|
|
33
|
+
const response = await ofetch('https://developer.gs.com/blog/posts');
|
|
34
|
+
const $ = load(response);
|
|
35
|
+
|
|
36
|
+
const items = $('div[data-cy="blog-card-grid"] a')
|
|
37
|
+
.toArray()
|
|
38
|
+
.map((item) => {
|
|
39
|
+
const link = 'https://developer.gs.com' + $(item).attr('href');
|
|
40
|
+
const title = $(item).find('span').eq(1).text();
|
|
41
|
+
const author = $(item).find('span').eq(2).text();
|
|
42
|
+
const description = $(item).find('span').eq(3).text();
|
|
43
|
+
const pubDate = $(item).find('span').eq(0).text();
|
|
44
|
+
return {
|
|
45
|
+
title,
|
|
46
|
+
link,
|
|
47
|
+
author,
|
|
48
|
+
description,
|
|
49
|
+
pubDate,
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
return {
|
|
54
|
+
title: 'Goldman Sachs Developer Blog',
|
|
55
|
+
link: 'https://developer.gs.com/blog/posts',
|
|
56
|
+
item: items,
|
|
57
|
+
};
|
|
58
|
+
}
|