style: auto format

This commit is contained in:
github-actions[bot]
2024-11-15 19:05:48 +00:00
parent 7ce029a051
commit af7e399cff
2 changed files with 3 additions and 4 deletions
+1 -3
View File
@@ -67,9 +67,7 @@ async function handler(ctx) {
const feed = response.data.data.content;
cache.set('dw:navigation', feed.topStoriesNavigations, config.cache.routeExpire);
const list = feed.contentComposition.informationSpaces
.flatMap((section) => Object.values(section).flatMap((component) => component[0]?.contents || []))
.filter((item) => typenames.has(item.__typename) && item.id);
const list = feed.contentComposition.informationSpaces.flatMap((section) => Object.values(section).flatMap((component) => component[0]?.contents || [])).filter((item) => typenames.has(item.__typename) && item.id);
const items = await processItems(
list.map((item) => {
item.link = new URL(item.namedUrl, 'https://www.dw.com').href;
+2 -1
View File
@@ -82,7 +82,8 @@ const i18n = (word: string, lang: string) => {
}
};
const m3u8tomp4 = (src: string) => src.replace('https://hlsvod.dw.com/i/', 'https://tvdownloaddw-a.akamaihd.net/').replace(',AVC_480x270,AVC_512x288,AVC_640x360,AVC_960x540,AVC_1280x720,AVC_1920x1080,.mp4.csmil/master.m3u8', 'AVC_1920x1080.mp4');
const m3u8tomp4 = (src: string) =>
src.replace('https://hlsvod.dw.com/i/', 'https://tvdownloaddw-a.akamaihd.net/').replace(',AVC_480x270,AVC_512x288,AVC_640x360,AVC_960x540,AVC_1280x720,AVC_1920x1080,.mp4.csmil/master.m3u8', 'AVC_1920x1080.mp4');
const processHtml = ($: CheerioAPI, contentLinks) => {
$('img').each((_, elem) => {