related videos added
This commit is contained in:
parent
1d299e5d0c
commit
20ace50856
@ -66,6 +66,10 @@ export async function video_basic_info(url: string, cookie?: string) {
|
||||
initial_response.contents.twoColumnWatchNextResults.results.results.contents[1]?.videoSecondaryInfoRenderer
|
||||
?.owner?.videoOwnerRenderer?.badges[0];
|
||||
const html5player = `https://www.youtube.com${body.split('"jsUrl":"')[1].split('"')[0]}`;
|
||||
const related: any[] = []
|
||||
initial_response.contents.twoColumnWatchNextResults.secondaryResults.secondaryResults.results.forEach((res: any) => {
|
||||
if(res.compactVideoRenderer) related.push(res.compactVideoRenderer.videoId)
|
||||
})
|
||||
const format = [];
|
||||
const vid = player_response.videoDetails;
|
||||
const microformat = player_response.microformat.playerMicroformatRenderer;
|
||||
@ -101,7 +105,8 @@ export async function video_basic_info(url: string, cookie?: string) {
|
||||
LiveStreamData,
|
||||
html5player,
|
||||
format,
|
||||
video_details
|
||||
video_details,
|
||||
related_videos : related
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user