mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2025-01-10 07:07:55 +01:00
[picta] Add default formats
This commit is contained in:
parent
5c619d2d5e
commit
270fcc1d74
@ -40,6 +40,19 @@ class PictaIE(PictaBaseIE):
|
|||||||
IE_NAME = 'picta'
|
IE_NAME = 'picta'
|
||||||
IE_DESC = 'Picta videos'
|
IE_DESC = 'Picta videos'
|
||||||
_VALID_URL = r'https?://(?:www\.)?picta\.cu/(?:medias|embed)/(?:\?v=)?(?P<id>[\da-z-]+)'
|
_VALID_URL = r'https?://(?:www\.)?picta\.cu/(?:medias|embed)/(?:\?v=)?(?P<id>[\da-z-]+)'
|
||||||
|
_formats = {
|
||||||
|
# Dash webm
|
||||||
|
'0': {'ext': 'webm', 'height': 144, 'format_note': 'DASH video', 'container': 'webm', 'vcodec': 'vp9'},
|
||||||
|
'1': {'ext': 'webm', 'height': 240, 'format_note': 'DASH video', 'vcodec': 'vp9'},
|
||||||
|
'2': {'ext': 'webm', 'height': 360, 'format_note': 'DASH video', 'vcodec': 'vp9'},
|
||||||
|
'3': {'ext': 'webm', 'height': 480, 'format_note': 'DASH video', 'vcodec': 'vp9'},
|
||||||
|
'4': {'ext': 'webm', 'height': 720, 'format_note': 'DASH video', 'vcodec': 'vp9'},
|
||||||
|
|
||||||
|
# Dash webm audio with opus inside
|
||||||
|
'5': {'ext': 'webm', 'format_note': 'DASH audio', 'acodec': 'opus', 'abr': 128},
|
||||||
|
'6': {'ext': 'webm', 'format_note': 'DASH audio', 'acodec': 'opus', 'abr': 134},
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'https://www.picta.cu/medias/orishas-everyday-2019-01-16-16-36-42-443003',
|
'url': 'https://www.picta.cu/medias/orishas-everyday-2019-01-16-16-36-42-443003',
|
||||||
@ -50,7 +63,7 @@ class PictaIE(PictaBaseIE):
|
|||||||
'ext': 'webm',
|
'ext': 'webm',
|
||||||
'title': 'Orishas - Everyday',
|
'title': 'Orishas - Everyday',
|
||||||
'thumbnail': r're:^https?://.*imagen/img.*\.png$',
|
'thumbnail': r're:^https?://.*imagen/img.*\.png$',
|
||||||
}
|
},
|
||||||
}, {
|
}, {
|
||||||
'url': 'https://www.picta.cu/embed/?v=818',
|
'url': 'https://www.picta.cu/embed/?v=818',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
@ -70,7 +83,7 @@ class PictaIE(PictaBaseIE):
|
|||||||
formats = []
|
formats = []
|
||||||
# MPD manifest
|
# MPD manifest
|
||||||
if info.get('manifest_url'):
|
if info.get('manifest_url'):
|
||||||
formats.extend(self._extract_mpd_formats(info.get('manifest_url'), video_id))
|
formats.extend(self._extract_mpd_formats(info.get('manifest_url'), video_id, formats_dict=self._formats))
|
||||||
if not formats:
|
if not formats:
|
||||||
raise ExtractorError('Cannot find video formats')
|
raise ExtractorError('Cannot find video formats')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user