mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[extractor/nebula] Add nebula.tv (#4918)
Closes #4917 Authored by: tannertechnology
This commit is contained in:
parent
1c09783f7a
commit
4cca2eb1bf
1 changed files with 5 additions and 3 deletions
|
@ -7,6 +7,8 @@
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import ExtractorError, parse_iso8601, try_get
|
from ..utils import ExtractorError, parse_iso8601, try_get
|
||||||
|
|
||||||
|
_BASE_URL_RE = r'https?://(?:www\.)?(?:watchnebula\.com|nebula\.app|nebula\.tv)'
|
||||||
|
|
||||||
|
|
||||||
class NebulaBaseIE(InfoExtractor):
|
class NebulaBaseIE(InfoExtractor):
|
||||||
_NETRC_MACHINE = 'watchnebula'
|
_NETRC_MACHINE = 'watchnebula'
|
||||||
|
@ -148,7 +150,7 @@ def _perform_login(self, username=None, password=None):
|
||||||
|
|
||||||
|
|
||||||
class NebulaIE(NebulaBaseIE):
|
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 = [
|
_TESTS = [
|
||||||
{
|
{
|
||||||
'url': 'https://nebula.app/videos/that-time-disney-remade-beauty-and-the-beast',
|
'url': 'https://nebula.app/videos/that-time-disney-remade-beauty-and-the-beast',
|
||||||
|
@ -246,7 +248,7 @@ def _real_extract(self, url):
|
||||||
|
|
||||||
class NebulaSubscriptionsIE(NebulaBaseIE):
|
class NebulaSubscriptionsIE(NebulaBaseIE):
|
||||||
IE_NAME = 'nebula:subscriptions'
|
IE_NAME = 'nebula:subscriptions'
|
||||||
_VALID_URL = r'https?://(?:www\.)?(?:watchnebula\.com|nebula\.app)/myshows'
|
_VALID_URL = rf'{_BASE_URL_RE}/myshows'
|
||||||
_TESTS = [
|
_TESTS = [
|
||||||
{
|
{
|
||||||
'url': 'https://nebula.app/myshows',
|
'url': 'https://nebula.app/myshows',
|
||||||
|
@ -274,7 +276,7 @@ def _real_extract(self, url):
|
||||||
|
|
||||||
class NebulaChannelIE(NebulaBaseIE):
|
class NebulaChannelIE(NebulaBaseIE):
|
||||||
IE_NAME = 'nebula:channel'
|
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 = [
|
_TESTS = [
|
||||||
{
|
{
|
||||||
'url': 'https://nebula.app/tom-scott-presents-money',
|
'url': 'https://nebula.app/tom-scott-presents-money',
|
||||||
|
|
Loading…
Reference in a new issue