style: auto format
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user