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 10:13:41 -05:00 committed by GitHub
parent ec5460614b
commit 1efb6d0cbe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

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 };