fix(routes/cbc): fix CBC route to exclude text to speech widget (#20734)

CBC articles have a text to speech widget at the beginning of every
article, which is useless and add lots of noise. This PR removes it.
This commit is contained in:
Bin Wang
2025-12-20 23:13:41 +08:00
committed by GitHub
parent ec5460614b
commit 1efb6d0cbe
+1
View File
@@ -71,6 +71,7 @@ async function handler(ctx) {
const pubDate = head.datePublished;
const descriptionDom = $('div[data-cy=storyWrapper]');
descriptionDom.find('div[class=share]').remove();
descriptionDom.find('div[class^="textToSpeech"]').remove();
const description = descriptionDom.html();
return { title, author, pubDate, description, link };