2024-06-21 18:51:00 +00:00
|
|
|
import re
|
|
|
|
|
2024-06-02 09:23:51 +00:00
|
|
|
from .common import InfoExtractor
|
2024-06-21 18:51:00 +00:00
|
|
|
from ..utils import (
|
|
|
|
extract_attributes,
|
2024-06-24 17:48:57 +00:00
|
|
|
float_or_none,
|
2024-06-21 18:51:00 +00:00
|
|
|
int_or_none,
|
|
|
|
traverse_obj,
|
|
|
|
)
|
2024-06-02 09:23:51 +00:00
|
|
|
|
|
|
|
|
2024-06-21 18:51:00 +00:00
|
|
|
class VidyardBaseIE(InfoExtractor):
|
2024-06-02 09:23:51 +00:00
|
|
|
|
2024-06-24 17:14:26 +00:00
|
|
|
_HEADERS = {}
|
|
|
|
|
2024-06-21 16:18:22 +00:00
|
|
|
def _get_formats_and_subtitles(self, video_source, video_id):
|
2024-06-02 09:23:51 +00:00
|
|
|
video_source = video_source or {}
|
|
|
|
formats, subtitles = [], {}
|
|
|
|
for key, value in video_source.items():
|
|
|
|
if key == 'hls':
|
|
|
|
for video_hls in value:
|
2024-06-24 17:14:26 +00:00
|
|
|
fmts, subs = self._extract_m3u8_formats_and_subtitles(video_hls.get('url'), video_id, headers=self._HEADERS)
|
2024-06-02 09:23:51 +00:00
|
|
|
formats.extend(fmts)
|
|
|
|
self._merge_subtitles(subs, target=subtitles)
|
|
|
|
else:
|
|
|
|
formats.extend({
|
|
|
|
'url': video_mp4.get('url'),
|
2024-06-21 16:25:08 +00:00
|
|
|
'ext': 'mp4',
|
2024-06-02 09:23:51 +00:00
|
|
|
} for video_mp4 in value)
|
|
|
|
|
|
|
|
return formats, subtitles
|
|
|
|
|
2024-06-21 16:18:22 +00:00
|
|
|
def _get_direct_subtitles(self, caption_json):
|
2024-06-02 09:23:51 +00:00
|
|
|
subs = {}
|
|
|
|
for caption in caption_json:
|
|
|
|
subs.setdefault(caption.get('language') or 'und', []).append({
|
|
|
|
'url': caption.get('vttUrl'),
|
2024-06-21 16:25:08 +00:00
|
|
|
'name': caption.get('name'),
|
2024-06-02 09:23:51 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
return subs
|
|
|
|
|
2024-06-21 21:35:46 +00:00
|
|
|
def _fetch_video_json(self, video_uuid, video_id=None):
|
|
|
|
video_id = video_id or video_uuid
|
|
|
|
return self._download_json(
|
|
|
|
f'https://play.vidyard.com/player/{video_uuid}.json', video_id)['payload']
|
|
|
|
|
2024-06-24 17:14:26 +00:00
|
|
|
def _process_video_json(self, json_data, video_id):
|
2024-06-21 21:35:46 +00:00
|
|
|
formats, subtitles = self._get_formats_and_subtitles(json_data['sources'], video_id)
|
|
|
|
self._merge_subtitles(self._get_direct_subtitles(json_data.get('captions')), target=subtitles)
|
|
|
|
|
|
|
|
return {
|
2024-06-24 17:41:05 +00:00
|
|
|
'id': str(json_data.get('facadeUuid') or json_data['videoUuid']),
|
2024-06-21 21:35:46 +00:00
|
|
|
'display_id': str(json_data['videoId']),
|
|
|
|
'title': json_data.get('name') or None,
|
|
|
|
'description': json_data.get('description') or None,
|
2024-06-24 17:48:57 +00:00
|
|
|
'duration': float_or_none(json_data.get('milliseconds'), 1000) or int_or_none(json_data.get('seconds')),
|
2024-06-21 21:35:46 +00:00
|
|
|
'formats': formats,
|
|
|
|
'subtitles': subtitles,
|
|
|
|
'thumbnails': [{'url': thumbnail_url}
|
|
|
|
for thumbnail_url in traverse_obj(json_data, ('thumbnailUrls', ...))],
|
2024-06-24 17:14:26 +00:00
|
|
|
'http_headers': self._HEADERS,
|
2024-06-21 21:35:46 +00:00
|
|
|
}
|
2024-06-02 09:23:51 +00:00
|
|
|
|
|
|
|
|
2024-06-21 18:51:00 +00:00
|
|
|
class VidyardIE(VidyardBaseIE):
|
|
|
|
_VALID_URL = [
|
2024-06-24 17:29:20 +00:00
|
|
|
r'https?://[\w-]+(?:\.hubs)?\.vidyard\.com/watch/(?P<id>[\w-]+)',
|
2024-06-21 18:51:00 +00:00
|
|
|
r'https?://embed\.vidyard\.com/share/(?P<id>[\w-]+)',
|
|
|
|
r'https?://play\.vidyard\.com/(?P<id>[\w-]+)\.html',
|
|
|
|
]
|
2024-06-02 09:23:51 +00:00
|
|
|
_TESTS = [
|
|
|
|
{
|
|
|
|
'url': 'https://vyexample03.hubs.vidyard.com/watch/oTDMPlUv--51Th455G5u7Q',
|
|
|
|
'info_dict': {
|
2024-06-24 17:41:05 +00:00
|
|
|
'id': 'oTDMPlUv--51Th455G5u7Q',
|
2024-06-21 21:35:46 +00:00
|
|
|
'display_id': '50347',
|
2024-06-02 09:23:51 +00:00
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Homepage Video',
|
|
|
|
'description': 'Look I changed the description.',
|
|
|
|
'thumbnail': 'https://cdn.vidyard.com/thumbnails/50347/OUPa5LTKV46849sLYngMqQ_small.jpg',
|
|
|
|
'duration': 99,
|
2024-06-21 16:25:08 +00:00
|
|
|
},
|
2024-06-02 09:23:51 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'url': 'https://share.vidyard.com/watch/PaQzDAT1h8JqB8ivEu2j6Y?',
|
|
|
|
'info_dict': {
|
2024-06-24 17:41:05 +00:00
|
|
|
'id': 'PaQzDAT1h8JqB8ivEu2j6Y',
|
2024-06-21 21:35:46 +00:00
|
|
|
'display_id': '9281024',
|
2024-06-02 09:23:51 +00:00
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Inline Embed',
|
|
|
|
'description': 'Vidyard video',
|
|
|
|
'thumbnail': 'https://cdn.vidyard.com/thumbnails/spacer.gif',
|
2024-06-24 17:48:57 +00:00
|
|
|
'duration': 41.186,
|
2024-06-21 16:25:08 +00:00
|
|
|
},
|
2024-06-02 09:23:51 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'url': 'https://embed.vidyard.com/share/oTDMPlUv--51Th455G5u7Q',
|
|
|
|
'info_dict': {
|
2024-06-24 17:41:05 +00:00
|
|
|
'id': 'oTDMPlUv--51Th455G5u7Q',
|
2024-06-21 21:35:46 +00:00
|
|
|
'display_id': '50347',
|
2024-06-02 09:23:51 +00:00
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Homepage Video',
|
|
|
|
'description': 'Look I changed the description.',
|
|
|
|
'thumbnail': 'https://cdn.vidyard.com/thumbnails/50347/OUPa5LTKV46849sLYngMqQ_small.jpg',
|
|
|
|
'duration': 99,
|
2024-06-21 16:25:08 +00:00
|
|
|
},
|
|
|
|
},
|
2024-06-21 21:35:46 +00:00
|
|
|
{
|
|
|
|
# First video from playlist below
|
|
|
|
'url': 'https://embed.vidyard.com/share/SyStyHtYujcBHe5PkZc5DL',
|
|
|
|
'info_dict': {
|
2024-06-24 17:41:05 +00:00
|
|
|
'id': 'SyStyHtYujcBHe5PkZc5DL',
|
2024-06-21 21:35:46 +00:00
|
|
|
'display_id': '41974005',
|
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Prepare the Frame and Track for Palm Beach Polysatin Shutters With BiFold Track',
|
|
|
|
'description': 'In this video, you will learn how to prepare the frame and track on Palm Beach shutters with a Bi-Fold Track system.',
|
|
|
|
'thumbnail': 'https://cdn.vidyard.com/thumbnails/41974005/IJw7oCaJcF1h7WWu3OVZ8A_small.png',
|
2024-06-24 17:48:57 +00:00
|
|
|
'duration': 258.666,
|
2024-06-21 21:35:46 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
# Playlist
|
|
|
|
'url': 'https://thelink.hubs.vidyard.com/watch/pwu7pCYWSwAnPxs8nDoFrE',
|
|
|
|
'info_dict': {
|
|
|
|
'_type': 'playlist',
|
|
|
|
'id': 'pwu7pCYWSwAnPxs8nDoFrE',
|
|
|
|
'title': 'PLAYLIST - Palm Beach Shutters- Bi-Fold Track System Installation',
|
|
|
|
'entries': [
|
|
|
|
{
|
2024-06-24 17:41:05 +00:00
|
|
|
'id': 'SyStyHtYujcBHe5PkZc5DL',
|
2024-06-21 21:35:46 +00:00
|
|
|
'display_id': '41974005',
|
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Prepare the Frame and Track for Palm Beach Polysatin Shutters With BiFold Track',
|
|
|
|
'thumbnail': 'https://cdn.vidyard.com/thumbnails/41974005/IJw7oCaJcF1h7WWu3OVZ8A_small.png',
|
2024-06-24 17:48:57 +00:00
|
|
|
'duration': 258.666,
|
2024-06-21 21:35:46 +00:00
|
|
|
},
|
|
|
|
{
|
2024-06-24 17:41:05 +00:00
|
|
|
'id': '1Fw4B84jZTXLXWqkE71RiM',
|
2024-06-21 21:35:46 +00:00
|
|
|
'display_id': '5861113',
|
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Palm Beach - Bi-Fold Track System "Frame Installation"',
|
|
|
|
'thumbnail': 'https://cdn.vidyard.com/thumbnails/5861113/29CJ54s5g1_aP38zkKLHew_small.jpg',
|
2024-06-24 17:48:57 +00:00
|
|
|
'duration': 167.858,
|
2024-06-21 21:35:46 +00:00
|
|
|
},
|
|
|
|
{
|
2024-06-24 17:41:05 +00:00
|
|
|
'id': 'DqP3wBvLXSpxrcqpT5kEeo',
|
2024-06-21 21:35:46 +00:00
|
|
|
'display_id': '41976334',
|
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Install the Track for Palm Beach Polysatin Shutters With BiFold Track',
|
|
|
|
'thumbnail': 'https://cdn.vidyard.com/thumbnails/5861090/RwG2VaTylUa6KhSTED1r1Q_small.png',
|
2024-06-24 17:48:57 +00:00
|
|
|
'duration': 94.229,
|
2024-06-21 21:35:46 +00:00
|
|
|
},
|
|
|
|
{
|
2024-06-24 17:41:05 +00:00
|
|
|
'id': 'opfybfxpzQArxqtQYB6oBU',
|
2024-06-21 21:35:46 +00:00
|
|
|
'display_id': '41976364',
|
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Install the Panel for Palm Beach Polysatin Shutters With BiFold Track',
|
|
|
|
'thumbnail': 'https://cdn.vidyard.com/thumbnails/5860926/JIOaJR08dM4QgXi_iQ2zGA_small.png',
|
2024-06-24 17:48:57 +00:00
|
|
|
'duration': 191.467,
|
2024-06-21 21:35:46 +00:00
|
|
|
},
|
|
|
|
{
|
2024-06-24 17:41:05 +00:00
|
|
|
'id': 'rWrXvkbTNNaNqD6189HJya',
|
2024-06-21 21:35:46 +00:00
|
|
|
'display_id': '41976382',
|
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Adjust the Panels for Palm Beach Polysatin Shutters With BiFold Track',
|
|
|
|
'thumbnail': 'https://cdn.vidyard.com/thumbnails/5860687/CwHxBv4UudAhOh43FVB4tw_small.png',
|
2024-06-24 17:48:57 +00:00
|
|
|
'duration': 138.155,
|
2024-06-21 21:35:46 +00:00
|
|
|
},
|
|
|
|
{
|
2024-06-24 17:41:05 +00:00
|
|
|
'id': 'eYPTB521MZ9TPEArSethQ5',
|
2024-06-21 21:35:46 +00:00
|
|
|
'display_id': '41976409',
|
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Assemble and Install the Valance for Palm Beach Polysatin Shutters With BiFold Track',
|
|
|
|
'thumbnail': 'https://cdn.vidyard.com/thumbnails/5861425/0y68qlMU4O5VKU7bJ8i_AA_small.png',
|
2024-06-24 17:48:57 +00:00
|
|
|
'duration': 148.224,
|
2024-06-21 21:35:46 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
'playlist_count': 6,
|
|
|
|
},
|
2024-06-24 17:29:20 +00:00
|
|
|
{
|
|
|
|
# Non hubs.vidyard.com playlist
|
|
|
|
'url': 'https://salesforce.vidyard.com/watch/d4vqPjs7Q5EzVEis5QT3jd',
|
|
|
|
'info_dict': {
|
|
|
|
'_type': 'playlist',
|
|
|
|
'id': 'd4vqPjs7Q5EzVEis5QT3jd',
|
|
|
|
'title': 'How To: Service Cloud: Import External Content in Lightning Knowledge',
|
|
|
|
'entries': [
|
|
|
|
{
|
2024-06-24 17:41:05 +00:00
|
|
|
'id': 'mcjDpSZir2iSttbvFkx6Rv',
|
2024-06-24 17:29:20 +00:00
|
|
|
'display_id': '29479036',
|
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Welcome to this Expert Coaching Series',
|
|
|
|
'thumbnail': 'https://cdn.vidyard.com/thumbnails/ouyQi9WuwyiOupChUWNmjQ/7170d3485ba602e012df05_small.jpg',
|
2024-06-24 17:48:57 +00:00
|
|
|
'duration': 38.205,
|
2024-06-24 17:29:20 +00:00
|
|
|
},
|
|
|
|
{
|
2024-06-24 17:41:05 +00:00
|
|
|
'id': '84bPYwpg243G6xYEfJdYw9',
|
2024-06-24 17:29:20 +00:00
|
|
|
'display_id': '21820704',
|
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Chapter 1 - Title + Agenda',
|
|
|
|
'thumbnail': 'https://cdn.vidyard.com/thumbnails/HFPN0ZgQq4Ow8BghGcQSow/bfaa30123c8f6601e7d7f2_small.jpg',
|
2024-06-24 17:48:57 +00:00
|
|
|
'duration': 98.016,
|
2024-06-24 17:29:20 +00:00
|
|
|
},
|
|
|
|
{
|
2024-06-24 17:41:05 +00:00
|
|
|
'id': 'nP17fMuvA66buVHUrzqjTi',
|
2024-06-24 17:29:20 +00:00
|
|
|
'display_id': '21820707',
|
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Chapter 2 - Import Options',
|
|
|
|
'thumbnail': 'https://cdn.vidyard.com/thumbnails/rGRIF5nFjPI9OOA2qJ_Dbg/86a8d02bfec9a566845dd4_small.jpg',
|
2024-06-24 17:48:57 +00:00
|
|
|
'duration': 199.136,
|
2024-06-24 17:29:20 +00:00
|
|
|
},
|
|
|
|
{
|
2024-06-24 17:41:05 +00:00
|
|
|
'id': 'm54EcwXdpA5gDBH5rgCYoV',
|
2024-06-24 17:29:20 +00:00
|
|
|
'display_id': '21820710',
|
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Chapter 3 - Importing Article Translations',
|
|
|
|
'thumbnail': 'https://cdn.vidyard.com/thumbnails/IVX4XR8zpSsiNIHx45kz-A/1ccbf8a29a33856d06b3ed_small.jpg',
|
2024-06-24 17:48:57 +00:00
|
|
|
'duration': 184.352,
|
2024-06-24 17:29:20 +00:00
|
|
|
},
|
|
|
|
{
|
2024-06-24 17:41:05 +00:00
|
|
|
'id': 'j4nzS42oq4hE9oRV73w3eQ',
|
2024-06-24 17:29:20 +00:00
|
|
|
'display_id': '21820716',
|
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Chapter 4 - Best Practices',
|
|
|
|
'thumbnail': 'https://cdn.vidyard.com/thumbnails/BtrRrQpRDLbA4AT95YQyog/1f1e6b8e7fdc3fa95ec8d3_small.jpg',
|
2024-06-24 17:48:57 +00:00
|
|
|
'duration': 296.960,
|
2024-06-24 17:29:20 +00:00
|
|
|
},
|
|
|
|
{
|
2024-06-24 17:41:05 +00:00
|
|
|
'id': 'y28PYfW5pftvers9PXzisC',
|
2024-06-24 17:29:20 +00:00
|
|
|
'display_id': '21820727',
|
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Chapter 5 - Migration Steps',
|
|
|
|
'thumbnail': 'https://cdn.vidyard.com/thumbnails/K2CdQOXDfLcrVTF60r0bdw/a09239ada28b6ffce12b1f_small.jpg',
|
2024-06-24 17:48:57 +00:00
|
|
|
'duration': 620.640,
|
2024-06-24 17:29:20 +00:00
|
|
|
},
|
|
|
|
{
|
2024-06-24 17:41:05 +00:00
|
|
|
'id': 'YWU1eQxYvhj29SjYoPw5jH',
|
2024-06-24 17:29:20 +00:00
|
|
|
'display_id': '21820733',
|
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Chapter 6 - Demo',
|
|
|
|
'thumbnail': 'https://cdn.vidyard.com/thumbnails/rsmhP-cO8dAa8ilvFGCX0g/7911ef415167cd14032068_small.jpg',
|
2024-06-24 17:48:57 +00:00
|
|
|
'duration': 631.456,
|
2024-06-24 17:29:20 +00:00
|
|
|
},
|
|
|
|
{
|
2024-06-24 17:41:05 +00:00
|
|
|
'id': 'nmEvVqpwdJUgb74zKsLGxn',
|
2024-06-24 17:29:20 +00:00
|
|
|
'display_id': '29479037',
|
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Schedule Your Follow-Up',
|
|
|
|
'thumbnail': 'https://cdn.vidyard.com/thumbnails/Rtwc7X4PEkF4Ae5kHi-Jvw/174ebed3f34227b1ffa1d0_small.jpg',
|
2024-06-24 17:48:57 +00:00
|
|
|
'duration': 33.608,
|
2024-06-24 17:29:20 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
'playlist_count': 8,
|
|
|
|
},
|
2024-06-02 09:23:51 +00:00
|
|
|
{
|
|
|
|
# URL of iframe embed src
|
|
|
|
'url': 'https://play.vidyard.com/iDqTwWGrd36vaLuaCY3nTs.html',
|
|
|
|
'info_dict': {
|
2024-06-24 17:41:05 +00:00
|
|
|
'id': 'iDqTwWGrd36vaLuaCY3nTs',
|
2024-06-21 21:35:46 +00:00
|
|
|
'display_id': '9281009',
|
2024-06-02 09:23:51 +00:00
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Lightbox Embed',
|
|
|
|
'thumbnail': 'https://cdn.vidyard.com/thumbnails/spacer.gif',
|
2024-06-24 17:48:57 +00:00
|
|
|
'duration': 39.035,
|
2024-06-21 16:25:08 +00:00
|
|
|
},
|
2024-06-02 09:23:51 +00:00
|
|
|
},
|
|
|
|
]
|
|
|
|
_EMBED_REGEX = [
|
|
|
|
# iframe embed
|
2024-06-21 18:51:00 +00:00
|
|
|
r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//play\.vidyard\.com/[\w-]+.\w+)\1',
|
2024-06-02 09:23:51 +00:00
|
|
|
]
|
|
|
|
_WEBPAGE_TESTS = [
|
|
|
|
{
|
2024-06-21 18:51:00 +00:00
|
|
|
# URL containing inline/lightbox embedded video
|
2024-06-02 09:23:51 +00:00
|
|
|
'url': 'https://resources.altium.com/p/2-the-extreme-importance-of-pc-board-stack-up',
|
|
|
|
'info_dict': {
|
2024-06-24 17:41:05 +00:00
|
|
|
'id': 'GDx1oXrFWj4XHbipfoXaMn',
|
2024-06-21 21:35:46 +00:00
|
|
|
'display_id': '3225198',
|
2024-06-02 09:23:51 +00:00
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'The Extreme Importance of PC Board Stack Up',
|
|
|
|
'thumbnail': 'https://cdn.vidyard.com/thumbnails/73_Q3_hBexWX7Og1sae6cg/9998fa4faec921439e2c04_small.jpg',
|
2024-06-24 17:48:57 +00:00
|
|
|
'duration': 3422.742,
|
2024-06-21 16:25:08 +00:00
|
|
|
},
|
2024-06-02 09:23:51 +00:00
|
|
|
},
|
|
|
|
]
|
2024-06-24 17:14:26 +00:00
|
|
|
_HEADERS = {
|
|
|
|
'referer': 'https://play.vidyard.com/',
|
|
|
|
}
|
2024-06-02 09:23:51 +00:00
|
|
|
|
2024-06-21 18:51:00 +00:00
|
|
|
@classmethod
|
|
|
|
def _extract_embed_urls(cls, url, webpage):
|
|
|
|
# Handle protocol-less embed URLs
|
|
|
|
for embed_url in super()._extract_embed_urls(url, webpage):
|
|
|
|
if embed_url.startswith('//'):
|
|
|
|
embed_url = f'https:{embed_url}'
|
|
|
|
yield embed_url
|
|
|
|
|
|
|
|
# Extract inline/lightbox embeds
|
|
|
|
for embed_elm in re.findall(r'(<img[^>]+class=(["\'])(?:[^>"\']* )?vidyard-player-embed(?: [^>"\']*)?\2[^>]+[^>]*>)', webpage):
|
|
|
|
embed = extract_attributes(embed_elm[0]) or {}
|
|
|
|
uuid = embed.get('data-uuid')
|
|
|
|
if uuid:
|
|
|
|
yield f'https://play.vidyard.com/{uuid}.html'
|
|
|
|
|
|
|
|
def _real_extract(self, url):
|
|
|
|
video_id = self._match_valid_url(url).group('id')
|
2024-06-21 21:35:46 +00:00
|
|
|
video_json = self._fetch_video_json(video_id)
|
2024-06-21 18:51:00 +00:00
|
|
|
|
2024-06-21 21:35:46 +00:00
|
|
|
if len(video_json['chapters']) == 1:
|
2024-06-24 17:14:26 +00:00
|
|
|
video_info = self._process_video_json(video_json['chapters'][0], video_id)
|
2024-06-21 21:35:46 +00:00
|
|
|
|
|
|
|
if video_info['title'] is None or video_info['description'] is None:
|
|
|
|
webpage = self._download_webpage(url, video_id, fatal=False)
|
|
|
|
|
|
|
|
if video_info['title'] is None:
|
|
|
|
video_info['title'] = self._og_search_title(webpage, default=None) or self._html_extract_title(webpage)
|
|
|
|
|
|
|
|
if video_info['description'] is None:
|
|
|
|
video_info['description'] = self._og_search_description(webpage, default=None)
|
|
|
|
|
|
|
|
return video_info
|
|
|
|
|
|
|
|
# Playlist
|
|
|
|
return self.playlist_result(
|
2024-06-24 17:14:26 +00:00
|
|
|
[self._process_video_json(chapter, video_id) for chapter in video_json['chapters']],
|
2024-06-21 21:35:46 +00:00
|
|
|
playlist_id=str(video_json['playerUuid']),
|
|
|
|
playlist_title=video_json.get('name'))
|