fix(route): remove swissinfo ads (#8671)

This commit is contained in:
Ethan Shen
2021-12-06 13:34:07 +08:00
committed by GitHub
parent ea04c22ee8
commit b5be05b1e2
+4
View File
@@ -48,6 +48,10 @@ module.exports = async (ctx) => {
const content = cheerio.load(detailResponse.data);
content('.si-detail__content .si-grid').remove();
content('.si-detail__content .si-teaser').remove();
content('.show-for-sr, time, address, .si-detail__translation').remove();
content('picture').each(function () {
content(this).html(`<img src="${content(this).find('source').first().attr('srcset')}">`);
});