Skip to content

pouya-asgharzade/YouTubeExtractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

YouTubeExtractor

YouTubeExtractor is a library for download videos from YouTube or download audio files

Value Types

UrlTypes

  • Specifies the type of output file
  • for example : UrlTypes.VideoMP4 or UrlTypes.AudioMP4

Quality

  • Specifies the quality of output file
  • for example : Quality.Medium360 or Quality.High720

OutPutType

  • Specifies the type to extract
  • for example : OutPutType.Muxed or OutPutType.AudioOnly

Url Types

Muxed

  • Audio and video composition

VideoOnly

  • Only video

AudioOnly

  • Only audio

Methods

GetVideoAsync

  • Get information and urls

ExtractCustomUrl

  • Get url with custom (Size,OutputType,Quality,ExtractType)

Usage

var MyClient = new System.Net.Http.HttpClient();
YouTubeExtractor.Extractor Extractor = new YouTubeExtractor.Extractor(MyClient);

var ExtractedVideo = await Extractor.GetVideoAsync("https://www.youtube.com/watch?v=U-tropVp94k");

Get info

Console.WriteLine("Title : " + ExtractedVideo.Info.Title);
Console.WriteLine("Channel : " + ExtractedVideo.Info.Channel);
Console.WriteLine("Description : " + ExtractedVideo.Info.Description);
Console.WriteLine("Subscribers : " + ExtractedVideo.Info.Subscribers);
Console.WriteLine("ChannelLogo : " + ExtractedVideo.Info.ChannelLogo);
Console.WriteLine("Thumbnail : " + ExtractedVideo.Info.Thumbnail);
Console.WriteLine("View : " + ExtractedVideo.Info.View);
Console.WriteLine("Like : " + ExtractedVideo.Info.Like);
Console.WriteLine("DisLike : " + ExtractedVideo.Info.DisLike);
Console.WriteLine("Duration : " + ExtractedVideo.Info.Duration);

Get custom download url

Url ExtractedURL = Extractor.ExtractCustomUrl(
  UrlEnum.UrlTypes.VideoMP4,
  UrlEnum.OutPutType.VideoOnly,
  UrlEnum.Quality.Medium360,
  ExtractedVideo.URL);
  
Console.WriteLine(ExtractedURL.URL);
  • With size restrictions
Url ExtractedURL = Extractor.ExtractCustomUrl(
  new Filter(OperatorEnum.Operators.Smaller, 30000000),
  UrlEnum.UrlTypes.VideoMP4,
  UrlEnum.OutPutType.VideoOnly,
  UrlEnum.Quality.Medium360,
  ExtractedVideo.URL);
  
Console.WriteLine(ExtractedURL.URL);

Me

Telegram

About

library for download videos from YouTube

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages