We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd6f2d9 commit 172f6cfCopy full SHA for 172f6cf
lib/routes/radio-canada/latest.js
@@ -31,10 +31,10 @@ export default async (ctx) => {
31
});
32
33
const $ = load(detailResponse.data);
34
- const rcState = $('script:contains("window._rcState_ = JSON.parse")')
+ const rcState = $('script:contains("window._rcState_ = ")')
35
.text()
36
- .match(/JSON\.parse\((".*")\);/)[1];
37
- const rcStateJson = JSON.parse(JSON.parse(rcState));
+ .match(/window\._rcState_ = (.*);/)[1];
+ const rcStateJson = JSON.parse(rcState);
38
const news = Object.values(rcStateJson.pagesV2.pages)[0];
39
item.description = news.data.newsStory.body.html.replaceAll('\\n', '<br>');
40
0 commit comments