mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
feat(route): add 中华人民共和国国家发展和改革委员会价格监测中心 (#14101)
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { id = 'sytzgg' } = ctx.params;
|
||||
const limit = ctx.query.limit ? parseInt(ctx.query.limit, 10) : 30;
|
||||
|
||||
const rootUrl = 'http://www.jgjcndrc.org.cn';
|
||||
const currentUrl = new URL(`list.aspx?clmId=${id}`, rootUrl).href;
|
||||
|
||||
const { data: response } = await got(currentUrl);
|
||||
|
||||
const $ = cheerio.load(response);
|
||||
|
||||
let items = $('ul.list_02 li.li a[title]')
|
||||
.slice(0, limit)
|
||||
.toArray()
|
||||
.map((item) => {
|
||||
item = $(item);
|
||||
|
||||
return {
|
||||
title: item.text(),
|
||||
link: new URL(item.prop('href'), rootUrl).href,
|
||||
pubDate: parseDate(item.prev().text()),
|
||||
};
|
||||
});
|
||||
|
||||
items = await Promise.all(
|
||||
items.map((item) =>
|
||||
ctx.cache.tryGet(item.link, async () => {
|
||||
const { data: detailResponse } = await got(item.link);
|
||||
|
||||
const content = cheerio.load(detailResponse);
|
||||
|
||||
item.title = content('div.txt_title1').text();
|
||||
item.description = content('div#zoom').html();
|
||||
item.pubDate = parseDate(content('div.txt_subtitle1').text().trim());
|
||||
|
||||
return item;
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
const author = $('title').text();
|
||||
const subtitle = $('li.L').first().text();
|
||||
const image = new URL($('img.logo2').prop('src'), rootUrl).href;
|
||||
|
||||
ctx.state.data = {
|
||||
item: items,
|
||||
title: `${author} - ${subtitle}`,
|
||||
link: currentUrl,
|
||||
description: author,
|
||||
language: $('html').prop('lang'),
|
||||
image,
|
||||
subtitle,
|
||||
author,
|
||||
};
|
||||
};
|
||||
@@ -22,6 +22,7 @@ module.exports = {
|
||||
'/fmprc/:category?': ['nicolaszf', 'nczitzk'],
|
||||
'/forestry/gjlckjdjt/:category?': ['nczitzk'],
|
||||
'/immiau/news': ['liu233w'],
|
||||
'/jgjcndrc/:id?': ['nczitzk'],
|
||||
'/jinan/healthcommission/medical_exam_notice': ['tzjyxb'],
|
||||
'/mee/ywdt/:category?': ['liuxsdev'],
|
||||
'/mem/gk/sgcc/:category?': ['nczitzk'],
|
||||
|
||||
@@ -866,6 +866,154 @@ module.exports = {
|
||||
},
|
||||
],
|
||||
},
|
||||
'jgjcndrc.org.cn': {
|
||||
_name: '中华人民共和国国家发展和改革委员会价格监测中心',
|
||||
'.': [
|
||||
{
|
||||
title: '栏目',
|
||||
docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin',
|
||||
source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'],
|
||||
target: (_, url) => {
|
||||
url = new URL(url);
|
||||
const id = url.searchParams.get('id');
|
||||
|
||||
return `/gov/jgjcndrc${id ? `/${id}` : ''}`;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '通知公告',
|
||||
docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin',
|
||||
source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'],
|
||||
target: '/gov/jgjcndrc/692',
|
||||
},
|
||||
{
|
||||
title: '中心工作动态',
|
||||
docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin',
|
||||
source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'],
|
||||
target: '/gov/jgjcndrc/693',
|
||||
},
|
||||
{
|
||||
title: '地方工作动态',
|
||||
docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin',
|
||||
source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'],
|
||||
target: '/gov/jgjcndrc/694',
|
||||
},
|
||||
{
|
||||
title: '监测信息',
|
||||
docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin',
|
||||
source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'],
|
||||
target: '/gov/jgjcndrc/695',
|
||||
},
|
||||
{
|
||||
title: '分析预测',
|
||||
docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin',
|
||||
source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'],
|
||||
target: '/gov/jgjcndrc/696',
|
||||
},
|
||||
{
|
||||
title: '调查报告',
|
||||
docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin',
|
||||
source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'],
|
||||
target: '/gov/jgjcndrc/697',
|
||||
},
|
||||
{
|
||||
title: '价格指数',
|
||||
docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin',
|
||||
source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'],
|
||||
target: '/gov/jgjcndrc/698',
|
||||
},
|
||||
{
|
||||
title: '地方价格监测',
|
||||
docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin',
|
||||
source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'],
|
||||
target: '/gov/jgjcndrc/699',
|
||||
},
|
||||
{
|
||||
title: '价格监测报告制度',
|
||||
docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin',
|
||||
source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'],
|
||||
target: '/gov/jgjcndrc/700',
|
||||
},
|
||||
{
|
||||
title: '监测法规',
|
||||
docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin',
|
||||
source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'],
|
||||
target: '/gov/jgjcndrc/701',
|
||||
},
|
||||
{
|
||||
title: '媒体聚焦',
|
||||
docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin',
|
||||
source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'],
|
||||
target: '/gov/jgjcndrc/753',
|
||||
},
|
||||
{
|
||||
title: '国内外市场价格监测情况周报',
|
||||
docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin',
|
||||
source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'],
|
||||
target: '/gov/jgjcndrc/749',
|
||||
},
|
||||
{
|
||||
title: '主要粮油副食品日报',
|
||||
docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin',
|
||||
source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'],
|
||||
target: '/gov/jgjcndrc/703',
|
||||
},
|
||||
{
|
||||
title: '生猪出厂价与玉米价格周报',
|
||||
docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin',
|
||||
source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'],
|
||||
target: '/gov/jgjcndrc/704',
|
||||
},
|
||||
{
|
||||
title: '国际市场石油价格每日动态',
|
||||
docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin',
|
||||
source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'],
|
||||
target: '/gov/jgjcndrc/705',
|
||||
},
|
||||
{
|
||||
title: '非学科类培训服务价格',
|
||||
docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin',
|
||||
source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'],
|
||||
target: '/gov/jgjcndrc/821',
|
||||
},
|
||||
{
|
||||
title: '监测周期价格动态',
|
||||
docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin',
|
||||
source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'],
|
||||
target: '/gov/jgjcndrc/706',
|
||||
},
|
||||
{
|
||||
title: '月度监测行情表',
|
||||
docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin',
|
||||
source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'],
|
||||
target: '/gov/jgjcndrc/707',
|
||||
},
|
||||
{
|
||||
title: '猪料、鸡料、蛋料比价',
|
||||
docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin',
|
||||
source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'],
|
||||
target: '/gov/jgjcndrc/708',
|
||||
},
|
||||
{
|
||||
title: '全国钢材批发市场价格周报',
|
||||
docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin',
|
||||
source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'],
|
||||
target: '/gov/jgjcndrc/739',
|
||||
},
|
||||
{
|
||||
title: '全国成品油批发市场价格周报',
|
||||
docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin',
|
||||
source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'],
|
||||
target: '/gov/jgjcndrc/740',
|
||||
},
|
||||
{
|
||||
title: '线上价格监测',
|
||||
docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin',
|
||||
source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'],
|
||||
target: '/gov/jgjcndrc/822',
|
||||
},
|
||||
],
|
||||
},
|
||||
'jinan.gov.cn': {
|
||||
_name: '济南市卫生健康委员会',
|
||||
jnmhc: [
|
||||
|
||||
@@ -14,6 +14,7 @@ module.exports = function (router) {
|
||||
router.get('/fmprc/:category?', require('./mfa/wjdt'));
|
||||
router.get('/forestry/gjlckjdjt/:category?', require('./forestry/gjlckjdjt'));
|
||||
router.get('/immiau/news', require('./immiau/news'));
|
||||
router.get('/jgjcndrc/:id?', require('./jgjcndrc'));
|
||||
router.get('/jinan/healthcommission/medical_exam_notice', require('./jinan/healthcommission/medical_exam_notice'));
|
||||
router.get('/mee/ywdt/:category?', require('./mee/ywdt'));
|
||||
router.get('/mem/gk/sgcc/:category?', require('./mem/sgcc'));
|
||||
|
||||
@@ -1852,6 +1852,28 @@
|
||||
</details>
|
||||
</Route>
|
||||
|
||||
### 价格监测中心 {#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin}
|
||||
|
||||
<Route author="nczitzk" example="/gov/jgjcndrc" path="/gov/jgjcndrc/:id?" paramsDesc={['栏目 id,见下表,默认为 692,即通知公告']} radar="1">
|
||||
| 通知公告 | 中心工作动态 | 地方工作动态 | 监测信息 | 分析预测 | 调查报告 |
|
||||
| -------- | ------------ | ------------ | -------- | -------- | -------- |
|
||||
| 692 | 693 | 694 | 695 | 696 | 697 |
|
||||
|
||||
| 价格指数 | 地方价格监测 | 价格监测报告制度 | 监测法规 | 媒体聚焦 |
|
||||
| -------- | ------------ | ---------------- | -------- | -------- |
|
||||
| 698 | 699 | 700 | 701 | 753 |
|
||||
|
||||
#### 监测信息
|
||||
|
||||
| 国内外市场价格监测情况周报 | 主要粮油副食品日报 | 生猪出厂价与玉米价格周报 | 国际市场石油价格每日 动态 |
|
||||
| -------------------------- | ------------------ | ------------------------ | ------------------------- |
|
||||
| 749 | 703 | 704 | 705 |
|
||||
|
||||
| 非学科类培训服务价格 | 监测周期价格动态 | 月度监测行情表 | 猪料、鸡料、蛋料比价 |
|
||||
| -------------------- | ---------------- | -------------- | -------------------- |
|
||||
| 821 | 706 | 707 | 708 |
|
||||
</Route>
|
||||
|
||||
## 中华人民共和国海关总署 {#zhong-hua-ren-min-gong-he-guo-hai-guan-zong-shu}
|
||||
|
||||
### 拍卖信息 / 海关法规 {#zhong-hua-ren-min-gong-he-guo-hai-guan-zong-shu-pai-mai-xin-xi-hai-guan-fa-gui}
|
||||
|
||||
Reference in New Issue
Block a user