Files
RSSHub/lib/routes/gov/suzhou/utils.js
T
石渠清心 cfe185e58c fix(route): 更新苏州市政府新闻栏目 (#9119)
新闻栏目新增便民公告
新闻栏目名称、顺序、链接与苏州市政府官网保持一致
改用https
更新文档,由于栏目过长改为竖排
2022-02-16 20:02:11 +08:00

21 lines
613 B
JavaScript

const cheerio = require('cheerio');
const content = (response) => {
const e = cheerio.load(response);
e('.article-extended').remove();
e('#shareNode').remove();
e('.article-auxiliary').remove();
const content = e('.contentShow').html()
? e('.contentShow').html()
: e('div.detail')
.html()
.replace(/<.?ucaptitle>/g, '')
.replace(/<.?ucapcontent>/g, '')
.replace(/"\/szsrmzf/g, '"https://www.suzhou.gov.cn/szsrmzf')
.replace('publishtime', 'span');
return content;
};
module.exports = {
content,
};