Provides all supported YouTube URL formats, including standard URL, shortened URL, channel URL, and playlist URL.
YouTube URLs typically follow a few formats:
- Standard Video URL:
https://www.youtube.com/watch?v=VIDEO_ID
- Shortened URLv
https://youtu.be/VIDEO_ID
- Playlist URL:
https://www.youtube.com/playlist?list=PLAYLIST_ID
- Channel URL:
https://www.youtube.com/channel/CHANNEL_ID
- YouTube Music URL:
https://music.youtube.com/watch?v=VIDEO_ID
These formats allow the library to navigate directly to specific videos, playlists, or channels on YouTube.
Additionally, this module also provides the YouTube Music URL pattern. This allows the library to handle a broader range of YouTube-related URLs effectively.
- Since:
- 1.0.0
- License:
- MIT
- Source:
Members
(inner, constant) YT_URLFORMAT
An object contains regular expressions for matching various YouTube URL formats.
Properties:
Name | Type | Description |
---|---|---|
STANDARD |
RegExp | Regular expression for matching YouTube standard video URLs of the form(s):
|
SHORTENED |
RegExp | Regular expression for matching YouTube shortened video URLs of the form(s):
|
VIDEO |
RegExp | Regular expression for matching combined YouTube video URLs (standard and shortened formats). |
CHANNEL |
RegExp | Regular expression for matching YouTube channel URLs of the form(s):
|
PLAYLIST |
RegExp | Regular expression for matching YouTube playlist URLs of the form(s):
|
MUSIC |
RegExp | Regular expression for matching YouTube Music URLs of the form(s):
|
- Since:
- 1.0.0
- Source: