diff options
author | Tanner Anderson <me@tanner.technology> | 2022-09-21 19:44:07 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-22 07:14:07 +0530 |
commit | 4cca2eb1bf8bb830df15cbcda21a93fe2392573a (patch) | |
tree | f28403ff5bdb0f64efce963be6f70b47bf4cc4de | |
parent | 1c09783f7ad6653001cb1788cbc6de635d44a4c4 (diff) | |
download | hypervideo-pre-4cca2eb1bf8bb830df15cbcda21a93fe2392573a.tar.lz hypervideo-pre-4cca2eb1bf8bb830df15cbcda21a93fe2392573a.tar.xz hypervideo-pre-4cca2eb1bf8bb830df15cbcda21a93fe2392573a.zip |
[extractor/nebula] Add nebula.tv (#4918)
Closes #4917
Authored by: tannertechnology
-rw-r--r-- | yt_dlp/extractor/nebula.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/yt_dlp/extractor/nebula.py b/yt_dlp/extractor/nebula.py index 7057b8b26..861fcb164 100644 --- a/yt_dlp/extractor/nebula.py +++ b/yt_dlp/extractor/nebula.py @@ -7,6 +7,8 @@ import urllib.parse from .common import InfoExtractor from ..utils import ExtractorError, parse_iso8601, try_get +_BASE_URL_RE = r'https?://(?:www\.)?(?:watchnebula\.com|nebula\.app|nebula\.tv)' + class NebulaBaseIE(InfoExtractor): _NETRC_MACHINE = 'watchnebula' @@ -148,7 +150,7 @@ class NebulaBaseIE(InfoExtractor): class NebulaIE(NebulaBaseIE): - _VALID_URL = r'https?://(?:www\.)?(?:watchnebula\.com|nebula\.app)/videos/(?P<id>[-\w]+)' + _VALID_URL = rf'{_BASE_URL_RE}/videos/(?P<id>[-\w]+)' _TESTS = [ { 'url': 'https://nebula.app/videos/that-time-disney-remade-beauty-and-the-beast', @@ -246,7 +248,7 @@ class NebulaIE(NebulaBaseIE): class NebulaSubscriptionsIE(NebulaBaseIE): IE_NAME = 'nebula:subscriptions' - _VALID_URL = r'https?://(?:www\.)?(?:watchnebula\.com|nebula\.app)/myshows' + _VALID_URL = rf'{_BASE_URL_RE}/myshows' _TESTS = [ { 'url': 'https://nebula.app/myshows', @@ -274,7 +276,7 @@ class NebulaSubscriptionsIE(NebulaBaseIE): class NebulaChannelIE(NebulaBaseIE): IE_NAME = 'nebula:channel' - _VALID_URL = r'https?://(?:www\.)?(?:watchnebula\.com|nebula\.app)/(?!myshows|videos/)(?P<id>[-\w]+)' + _VALID_URL = rf'{_BASE_URL_RE}/(?!myshows|videos/)(?P<id>[-\w]+)' _TESTS = [ { 'url': 'https://nebula.app/tom-scott-presents-money', |