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:
parent
ec5460614b
commit
1efb6d0cbe
|
|
@ -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 };
|
||||
|
|
|
|||
Loading…
Reference in New Issue