mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-12-26 00:07:55 +01:00
[intldropout] reworked Extractor for www.dropout.tv
This commit is contained in:
parent
620ca40bbb
commit
6b65dae7b1
@ -8,38 +8,36 @@ from ..utils import ExtractorError
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
class IntlDropoutIE(VHXEmbedIE):
|
class DropoutIE(VHXEmbedIE):
|
||||||
IE_NAME = 'intldropout'
|
IE_NAME = 'dropout'
|
||||||
IE_DESC = 'International Dropout.tv'
|
IE_DESC = 'Dropout.tv'
|
||||||
_NETRC_MACHINE = 'intldropouttv'
|
_NETRC_MACHINE = 'dropouttv'
|
||||||
_LOGIN_URL = 'https://www.dropout.tv/login'
|
_LOGIN_URL = 'https://www.dropout.tv/login'
|
||||||
_LOGOUT_URL = 'https://www.dropout.tv/logout'
|
_LOGOUT_URL = 'https://www.dropout.tv/logout'
|
||||||
_VALID_URL = r'https://www\.dropout\.tv/(?:[^/]+/season:[^/]+/)?videos/(?P<id>.+)'
|
_VALID_URL = r'https://www\.dropout\.tv/(?:[^/]+/(?:season:[^/]/))?videos/(?P<id>.+)'
|
||||||
_TESTS = [
|
_TESTS = [
|
||||||
{
|
{
|
||||||
'url': 'https://www.dropout.tv/um-actually/season:1/videos/c-3po-s-origins-hp-lovecraft-the-food-album-with-weird-al-yankovic',
|
'url': 'https://www.dropout.tv/dimension-20-tiny-heist/season:1/videos/big-little-crimes',
|
||||||
'md5': '8beaac579b6ba762f63cd452fd28dcce',
|
'md5': '46edf4c6d632e2771a42a235f920b8f7',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '397785',
|
'id': '382486557',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': "C-3PO's Origins, HP Lovecraft, the Food Album (with Weird Al Yankovic)",
|
'uploader': 'OTT Videos',
|
||||||
'thumbnail': r're:^https://vhx.imgix.net/.*\.jpg$',
|
'uploader_id': 'user80538407',
|
||||||
'description': 'Caldwell Tanner, Siobhan Thompson, and Nate Dern inspect guns and review the Diagon Alley bar scene.',
|
'title': "Untitled",
|
||||||
'upload_date': '20181206',
|
'thumbnail': r're:^https://i.vimeocdn.com/.*\.jpg$',
|
||||||
'timestamp': 1544117975,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'url': 'https://www.dropout.tv/videos/um-actually-behind-the-scenes',
|
'url': 'https://www.dropout.tv/videos/um-actually-behind-the-scenes',
|
||||||
'md5': 'b974927cd563423fe50945dbfdbb894c',
|
'md5': '7fd342c652a86b996bae2920695593af',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '397943',
|
'id': '265656116',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
|
'uploader': 'OTT Videos',
|
||||||
|
'uploader_id': 'user80538407',
|
||||||
'title': 'Um, Actually: Behind the Scenes',
|
'title': 'Um, Actually: Behind the Scenes',
|
||||||
'thumbnail': r're:^https://vhx.imgix.net/.*\.jpg$',
|
'thumbnail': r're:^https://i.vimeocdn.com/.*\.jpg$',
|
||||||
'description': 'What does it take to stump the nerdy? Mike Trapp and team pull back the curtain.',
|
|
||||||
'upload_date': '20181206',
|
|
||||||
'timestamp': 1544118409,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -66,14 +64,14 @@ class IntlDropoutIE(VHXEmbedIE):
|
|||||||
return self.url_result(video, video_id=video_id, video_title=video_title)
|
return self.url_result(video, video_id=video_id, video_title=video_title)
|
||||||
|
|
||||||
|
|
||||||
class IntlDropoutPlaylistIE(IntlDropoutIE):
|
class DropoutPlaylistIE(DropoutIE):
|
||||||
IE_NAME = 'intldropout:playlist'
|
IE_NAME = 'dropout:playlist'
|
||||||
_VALID_URL = r'https://www\.dropout\.tv/(?P<id>.+)'
|
_VALID_URL = r'https://www\.dropout\.tv/(?P<id>.+)'
|
||||||
_TESTS = [
|
_TESTS = [
|
||||||
{
|
{
|
||||||
'url': 'https://www.dropout.tv/um-actually',
|
'url': 'https://www.dropout.tv/um-actually',
|
||||||
'md5': 'ebcd26ef54f546225e7cb96e79da31cc',
|
'md5': 'ebcd26ef54f546225e7cb96e79da31cc',
|
||||||
'playlist_count': 30,
|
'playlist_count': 33,
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'um-actually',
|
'id': 'um-actually',
|
||||||
'title': 'Um, Actually',
|
'title': 'Um, Actually',
|
||||||
@ -82,7 +80,7 @@ class IntlDropoutPlaylistIE(IntlDropoutIE):
|
|||||||
{
|
{
|
||||||
'url': 'https://www.dropout.tv/new-releases',
|
'url': 'https://www.dropout.tv/new-releases',
|
||||||
'md5': 'ebcd26ef54f546225e7cb96e79da31cc',
|
'md5': 'ebcd26ef54f546225e7cb96e79da31cc',
|
||||||
'playlist_count': 31,
|
'playlist_count': 15,
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'new-releases',
|
'id': 'new-releases',
|
||||||
'title': 'New Releases',
|
'title': 'New Releases',
|
||||||
@ -101,7 +99,7 @@ class IntlDropoutPlaylistIE(IntlDropoutIE):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def suitable(cls, url):
|
def suitable(cls, url):
|
||||||
return False if IntlDropoutIE.suitable(url) else super(IntlDropoutPlaylistIE, cls).suitable(url)
|
return False if DropoutIE.suitable(url) else super(DropoutPlaylistIE, cls).suitable(url)
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
playlist_id = self._match_id(url)
|
playlist_id = self._match_id(url)
|
@ -293,9 +293,9 @@ from .discoveryvr import DiscoveryVRIE
|
|||||||
from .disney import DisneyIE
|
from .disney import DisneyIE
|
||||||
from .dispeak import DigitallySpeakingIE
|
from .dispeak import DigitallySpeakingIE
|
||||||
from .dropbox import DropboxIE
|
from .dropbox import DropboxIE
|
||||||
from .intldropout import (
|
from .dropout import (
|
||||||
IntlDropoutIE,
|
DropoutIE,
|
||||||
IntlDropoutPlaylistIE,
|
DropoutPlaylistIE,
|
||||||
)
|
)
|
||||||
from .dw import (
|
from .dw import (
|
||||||
DWIE,
|
DWIE,
|
||||||
|
Loading…
Reference in New Issue
Block a user