Class UriWebServices.YouTube
- Namespace
- SunamoUriWebServices
- Assembly
- SunamoUriWebServices.dll
Provides YouTube URL building methods.
public static class UriWebServices.YouTube
- Inheritance
-
UriWebServices.YouTube
- Inherited Members
Fields
YtVideoStart
YouTube video URL prefix.
public const string YtVideoStart = "https://www.youtube.com/watch?v="
Field Value
Methods
GetHtmlAnchor(string)
Gets HTML anchor element for the specified YouTube video code.
public static string GetHtmlAnchor(string videoCode)
Parameters
videoCodestringThe YouTube video code.
Returns
- string
An HTML anchor element linking to the video.
GetLinkToSearch(string)
Gets YouTube search URL for the specified search query.
public static string GetLinkToSearch(string searchQuery)
Parameters
searchQuerystringThe search query.
Returns
- string
The YouTube search URL.
GetLinkToVideo(string)
Gets YouTube video URL for the specified video code.
public static string GetLinkToVideo(string videoCode)
Parameters
videoCodestringThe YouTube video code.
Returns
- string
The YouTube video URL.
ParseYtCode(string)
Parses YouTube video code from a URI. Returns null if the code cannot be extracted.
public static string ParseYtCode(string uri)
Parameters
uristringThe YouTube URI to parse.
Returns
- string
The extracted YouTube video code.
ReplaceOperators(string)
Removes YouTube search operators from the input text.
public static string ReplaceOperators(string text)
Parameters
textstringThe input text to process.
Returns
- string
The text with operators removed.
SearchYouTubeSerialSerie(int, int, string)
Searches YouTube for all episodes of a TV show season.
public static void SearchYouTubeSerialSerie(int partCount, int seasonNumber, string showName)