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

@@ -24,16 +24,13 @@ const config = {
};
module.exports = async (ctx) => {
const cfg = config[ctx.params.caty];
console.log(cfg.link);
const cfg = config[ctx.params.caty];
if (!cfg) {
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 response = await got({ method: 'get', url: currentUrl });
const $ = cheerio.load(response.data);
const list = $('div.zx_ml_list ul li span.tit')
.map((_, item) => {