Update zfxxgj.js

This commit is contained in:
laoxu
2021-01-10 20:34:46 +08:00
committed by GitHub
parent d8988068b3
commit e8aa07afd9

View File

@@ -25,15 +25,12 @@ const config = {
module.exports = async (ctx) => { module.exports = async (ctx) => {
const cfg = config[ctx.params.caty]; const cfg = config[ctx.params.caty];
console.log(cfg.link);
if (!cfg) { if (!cfg) {
throw Error('Bad category. See <a href="https://docs.rsshub.app/government.html#guang-dong-sheng-jiao-yu-ting">docs</a>'); throw Error('Bad category. See <a href="https://docs.rsshub.app/government.html#guang-dong-sheng-jiao-yu-ting">docs</a>');
} }
const currentUrl = url.resolve(rootUrl, cfg.link); const currentUrl = url.resolve(rootUrl, cfg.link);
const response = await got({ method: 'get', url: currentUrl }); const response = await got({ method: 'get', url: currentUrl });
const $ = cheerio.load(response.data); const $ = cheerio.load(response.data);
const list = $('div.zx_ml_list ul li span.tit') const list = $('div.zx_ml_list ul li span.tit')
.map((_, item) => { .map((_, item) => {