mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-17 03:58:49 +08:00
Update zfxxgj.js
This commit is contained in:
@@ -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) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user