parent
7923ebf123
commit
d8988068b3
|
|
@ -25,13 +25,13 @@ const config = {
|
|||
|
||||
module.exports = async (ctx) => {
|
||||
const cfg = config[ctx.params.caty];
|
||||
console.log(cfg.link)
|
||||
console.log(cfg.link);
|
||||
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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue