Package help to retrieve Youtube video and audio Info in various format and their uls
using YoutubeData;
Youtube youtube=new Youtube();
;
- asynchronous (async /await)
- sychronous
- callback function
Response response=await youtube.GetVideoInfoAsync('videoId')
if(response){
Console.Writeline(response.Data);
}
Response response=youtube.GetVideoInfo('videoId')
if(response){
Console.Writeline(response.Data);
}
youtube.GetVideoInfo('videoId',(errors,data)=>{
Console.Writeline(data);
})
Data object contain youtube videoInfo ,but the interesting part is video urls which can be found inside formarts(video+audio) and adaptiveFormats(video only or audio only) under streamingData of player_response
string videoUrl=response.data.player_response.streamingData.formats[0].url
string videoUrl=response.data.player_response.streamingData.formats[0].signatureCipher.url&signature={deciphered signature}