diff --git a/docs/government.md b/docs/government.md
index 6810a5d19d..931cc1d4c8 100644
--- a/docs/government.md
+++ b/docs/government.md
@@ -180,6 +180,28 @@ pageClass: routes
+## 广州市人民政府
+
+### 新闻
+
+
+
+| 广州要闻 | 今日头条 | 通知公告 |
+| ---- | ---- | ---- |
+| gzyw | jrtt | tzgg |
+
+
+
+### 政务公开
+
+
+
+| 文字解读 |
+| ---- |
+| zcjd |
+
+
+
## 国家广播电视总局
### 分类
diff --git a/lib/routes/v2ex/post.js b/lib/routes/v2ex/post.js
index 842f841c6e..5b4d26c4d7 100644
--- a/lib/routes/v2ex/post.js
+++ b/lib/routes/v2ex/post.js
@@ -1,5 +1,6 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
+const { parseDate } = require('@/utils/parse-date');
module.exports = async (ctx) => {
const postid = ctx.params.postid;
@@ -29,8 +30,10 @@ module.exports = async (ctx) => {
guid: post.attr('id'),
link: `${pageUrl}#${post.attr('id')}`,
author: post.find('.dark').first().text(),
+ pubDate: parseDate(post.find('.ago').attr('title')),
};
})
.reverse(),
+ allowEmpty: true,
};
};
diff --git a/lib/v2/gov/gz/index.js b/lib/v2/gov/gz/index.js
new file mode 100644
index 0000000000..06e17bf690
--- /dev/null
+++ b/lib/v2/gov/gz/index.js
@@ -0,0 +1,38 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+const { parseDate } = require('@/utils/parse-date');
+
+const rootUrl = 'https://www.gz.gov.cn';
+
+const urlMap = {
+ gzyw: 'gzyw',
+ jrtt: 'jrtt',
+ tzgg: 'tzgg',
+ zcjd: 'zcjd/zcjd',
+};
+
+module.exports = async (ctx) => {
+ const channel = ctx.params.channel;
+ const category = ctx.params.category;
+ const url = `${rootUrl}/${channel}/${urlMap[category]}/`;
+ const response = await got(url);
+ const $ = cheerio.load(response.data);
+
+ const items = $('.news_list li')
+ .toArray()
+ .map((item) => {
+ item = $(item);
+ const href = item.find('a').attr('href');
+ return {
+ title: item.find('a').attr('title'),
+ link: href,
+ pubDate: parseDate(item.find('span').text()),
+ };
+ });
+
+ ctx.state.data = {
+ title: `广州市人民政府 - ${$('.main_title').text()}`,
+ link: url,
+ item: items,
+ };
+};
diff --git a/lib/v2/gov/maintainer.js b/lib/v2/gov/maintainer.js
index 88d9f483fb..17365a08fa 100644
--- a/lib/v2/gov/maintainer.js
+++ b/lib/v2/gov/maintainer.js
@@ -46,6 +46,8 @@ module.exports = {
'/beijing/kw/:channel': ['Fatpandac'],
'/guangdong/tqyb/tfxtq': ['Fatpandac'],
'/guangdong/tqyb/sncsyjxh': ['Fatpandac'],
+ '/gz/xw/:category': ['drgnchan'],
+ '/gz/zwgk/:category': ['drgnchan'],
'/hebei/czt/xwdt/:category?': ['nczitzk'],
'/huizhou/zwgk/:category?': ['Fatpandac'],
'/hunan/changsha/major-email': ['shansing'],
diff --git a/lib/v2/gov/radar.js b/lib/v2/gov/radar.js
index 703aa18636..b34a226c12 100644
--- a/lib/v2/gov/radar.js
+++ b/lib/v2/gov/radar.js
@@ -428,6 +428,17 @@ module.exports = {
},
],
},
+ 'gz.gov.cn': {
+ _name: '广州市人民政府',
+ www: [
+ {
+ title: '新闻',
+ docs: 'https://docs.rsshub.app/government.html#guang-zhou-shi-ren-min-zheng-fu',
+ source: ['/:channel/:category'],
+ target: (params) => `/gov/gz/${params.channel}/${params.category}`,
+ },
+ ],
+ },
'hebei.gov.cn': {
_name: '河北省人民政府',
czt: [
diff --git a/lib/v2/gov/router.js b/lib/v2/gov/router.js
index 8e4d2784e5..71a7be5906 100644
--- a/lib/v2/gov/router.js
+++ b/lib/v2/gov/router.js
@@ -38,6 +38,7 @@ module.exports = function (router) {
router.get('/beijing/kw/:channel', require('./beijing/kw/index'));
router.get('/guangdong/tqyb/tfxtq', require('./guangdong/tqyb/tfxtq'));
router.get('/guangdong/tqyb/sncsyjxh', require('./guangdong/tqyb/sncsyjxh'));
+ router.get('/gz/:channel/:category', require('./gz/index'));
router.get('/hebei/czt/xwdt/:category?', require('./hebei/czt'));
router.get('/huizhou/zwgk/:category?', require('./huizhou/zwgk/index'));
router.get('/hunan/changsha/major-email', require('./hunan/changsha/major-email'));