C# Класс YoutubeExtractor.DownloadUrlResolver

Provides a method to get the download link of a YouTube video.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
DecryptDownloadUrl ( VideoInfo videoInfo ) : void

Decrypts the signature in the VideoInfo.DownloadUrl property and sets it to the decrypted URL. Use this method, if you have decryptSignature in the method set to false.

GetDownloadUrls ( string videoUrl, bool decryptSignature = true ) : IEnumerable

Gets a list of VideoInfos for the specified URL.

GetDownloadUrlsAsync ( string videoUrl, bool decryptSignature = true ) : System.Threading.Tasks.Task>
TryNormalizeYoutubeUrl ( string url, string &normalizedUrl ) : bool

Normalizes the given YouTube URL to the format http://youtube.com/watch?v={youtube-id} and returns whether the normalization was successful or not.

Приватные методы

Метод Описание
ExtractDownloadUrls ( JObject json ) : IEnumerable
GetAdaptiveStreamMap ( JObject json ) : string
GetDecipheredSignature ( string htmlPlayerVersion, string signature ) : string
GetHtml5PlayerVersion ( JObject json ) : string
GetStreamMap ( JObject json ) : string
GetVideoInfos ( IEnumerable extractionInfos, string videoTitle ) : IEnumerable
GetVideoTitle ( JObject json ) : string
IsVideoUnavailable ( string pageSource ) : bool
LoadJson ( string url ) : JObject
ThrowYoutubeParseException ( Exception innerException, string videoUrl ) : void

Описание методов

DecryptDownloadUrl() публичный статический Метод

Decrypts the signature in the VideoInfo.DownloadUrl property and sets it to the decrypted URL. Use this method, if you have decryptSignature in the method set to false.
/// There was an error while deciphering the signature. ///
public static DecryptDownloadUrl ( VideoInfo videoInfo ) : void
videoInfo VideoInfo The video info which's downlaod URL should be decrypted.
Результат void

GetDownloadUrls() публичный статический Метод

Gets a list of VideoInfos for the specified URL.
/// The parameter is null. /// /// The parameter is not a valid YouTube URL. /// The video is not available. /// An error occurred while downloading the YouTube page html. /// The Youtube page could not be parsed.
public static GetDownloadUrls ( string videoUrl, bool decryptSignature = true ) : IEnumerable
videoUrl string The URL of the YouTube video.
decryptSignature bool /// A value indicating whether the video signatures should be decrypted or not. Decrypting /// consists of a HTTP request for each , so you may want to set /// this to false and call on your selected later. ///
Результат IEnumerable

GetDownloadUrlsAsync() публичный статический Метод

public static GetDownloadUrlsAsync ( string videoUrl, bool decryptSignature = true ) : System.Threading.Tasks.Task>
videoUrl string
decryptSignature bool
Результат System.Threading.Tasks.Task>

TryNormalizeYoutubeUrl() публичный статический Метод

Normalizes the given YouTube URL to the format http://youtube.com/watch?v={youtube-id} and returns whether the normalization was successful or not.
public static TryNormalizeYoutubeUrl ( string url, string &normalizedUrl ) : bool
url string The YouTube URL to normalize.
normalizedUrl string The normalized YouTube URL.
Результат bool