From f4f14bcae7aaf173ffe6dd4376e08add36d1f99f Mon Sep 17 00:00:00 2001 From: Bin Wang Date: Sun, 12 Nov 2023 22:52:00 -0500 Subject: [PATCH] fix(route): Remove share widget from CBC route (#13773) CBC feed has "Social Sharing" in its feed. This PR removes it since it's not needed in RSS feed. --- lib/v2/cbc/topics.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/v2/cbc/topics.js b/lib/v2/cbc/topics.js index df5bbf4495..73c2c0b3cb 100644 --- a/lib/v2/cbc/topics.js +++ b/lib/v2/cbc/topics.js @@ -41,7 +41,9 @@ module.exports = async (ctx) => { author = head.author.map((author) => author.name).join(' & '); } const pubDate = head.datePublished; - const description = $('div[data-cy=storyWrapper]').html(); + const descriptionDom = $('div[data-cy=storyWrapper]'); + descriptionDom.find('div[class=share]').remove(); + const description = descriptionDom.html(); return { title, author, pubDate, description, link }; })