mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
* feat(route): add xinhua-daily-telegraph Add xinhua-daily telegraph route and doc mentioned in issue #11390. * feat(route): add radar for xinhua-daily-telegraph Add required radar config file. * feat(router): change router name and cache method Change router name from `xinhua-daily-telegraph` to `mrdx`. Fix cache method to avoid processing at each request. * feat(route): fix wrong date and improper cache method Fix wrong `pubDate` by using `parseDate` in `utils/parse-date`. Fix improper cache method. Now it caches proceeded RSS results. * feat(radar): update source wildcard in lib/v2/mrdx/radar.js * fix(router): use unique article link as guid Use specific article link as guid. Use specific article link for every article instead of the homepage.
18 lines
389 B
JavaScript
18 lines
389 B
JavaScript
function getElementChildrenInnerText(element) {
|
|
let text = '';
|
|
for (const child of element.children) {
|
|
if (child.type === 'text') {
|
|
text += child.data.trim();
|
|
}
|
|
if (child.children !== undefined) {
|
|
text += getElementChildrenInnerText(child);
|
|
}
|
|
}
|
|
|
|
return text;
|
|
}
|
|
|
|
module.exports = {
|
|
getElementChildrenInnerText,
|
|
};
|