mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-07-21 10:54:13 +09:00
Compare commits
3 Commits
1641b13232
...
2405854705
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2405854705 | ||
![]() |
0cf09c2b41 | ||
![]() |
0156ce95c5 |
@ -42,8 +42,8 @@ class URPlayIE(InfoExtractor):
|
|||||||
url = url.replace('skola.se/Produkter', 'play.se/program')
|
url = url.replace('skola.se/Produkter', 'play.se/program')
|
||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
urplayer_data = self._parse_json(self._html_search_regex(
|
urplayer_data = self._parse_json(self._html_search_regex(
|
||||||
r'data-react-class="components/Player/Player"[^>]+data-react-props="({.+?})"',
|
r'data-react-class="routes/Product/components/ProgramContainer/ProgramContainer"[^>]+data-react-props="({.+?})"',
|
||||||
webpage, 'urplayer data'), video_id)['currentProduct']
|
webpage, 'urplayer data'), video_id)['accessibleEpisodes'][0]
|
||||||
episode = urplayer_data['title']
|
episode = urplayer_data['title']
|
||||||
raw_streaming_info = urplayer_data['streamingInfo']['raw']
|
raw_streaming_info = urplayer_data['streamingInfo']['raw']
|
||||||
host = self._download_json(
|
host = self._download_json(
|
||||||
|
@ -500,6 +500,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
'uploader': 'AfrojackVEVO',
|
'uploader': 'AfrojackVEVO',
|
||||||
'uploader_id': 'AfrojackVEVO',
|
'uploader_id': 'AfrojackVEVO',
|
||||||
'upload_date': '20131011',
|
'upload_date': '20131011',
|
||||||
|
'abr': 129.495,
|
||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
'youtube_include_dash_manifest': True,
|
'youtube_include_dash_manifest': True,
|
||||||
@ -1018,6 +1019,28 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
'url': 'https://www.youtube.com/watch_popup?v=63RmMXCd_bQ',
|
'url': 'https://www.youtube.com/watch_popup?v=63RmMXCd_bQ',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
# https://github.com/ytdl-org/youtube-dl/pull/28094
|
||||||
|
'url': 'OtqTfy26tG0',
|
||||||
|
'info_dict': {
|
||||||
|
'id': 'OtqTfy26tG0',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'Burn Out',
|
||||||
|
'description': 'md5:8d07b84dcbcbfb34bc12a56d968b6131',
|
||||||
|
'upload_date': '20141120',
|
||||||
|
'uploader': 'The Cinematic Orchestra - Topic',
|
||||||
|
'uploader_id': 'UCIzsJBIyo8hhpFm1NK0uLgw',
|
||||||
|
'uploader_url': r're:https?://(?:www\.)?youtube\.com/channel/UCIzsJBIyo8hhpFm1NK0uLgw',
|
||||||
|
'artist': 'The Cinematic Orchestra',
|
||||||
|
'track': 'Burn Out',
|
||||||
|
'album': 'Every Day',
|
||||||
|
'release_data': None,
|
||||||
|
'release_year': None,
|
||||||
|
},
|
||||||
|
'params': {
|
||||||
|
'skip_download': True,
|
||||||
|
},
|
||||||
|
},
|
||||||
]
|
]
|
||||||
_formats = {
|
_formats = {
|
||||||
'5': {'ext': 'flv', 'width': 400, 'height': 240, 'acodec': 'mp3', 'abr': 64, 'vcodec': 'h263'},
|
'5': {'ext': 'flv', 'width': 400, 'height': 240, 'acodec': 'mp3', 'abr': 64, 'vcodec': 'h263'},
|
||||||
@ -1518,6 +1541,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
|
|
||||||
if itag:
|
if itag:
|
||||||
itags.append(itag)
|
itags.append(itag)
|
||||||
|
tbr = float_or_none(
|
||||||
|
fmt.get('averageBitrate') or fmt.get('bitrate'), 1000)
|
||||||
dct = {
|
dct = {
|
||||||
'asr': int_or_none(fmt.get('audioSampleRate')),
|
'asr': int_or_none(fmt.get('audioSampleRate')),
|
||||||
'filesize': int_or_none(fmt.get('contentLength')),
|
'filesize': int_or_none(fmt.get('contentLength')),
|
||||||
@ -1526,8 +1551,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
'fps': int_or_none(fmt.get('fps')),
|
'fps': int_or_none(fmt.get('fps')),
|
||||||
'height': int_or_none(fmt.get('height')),
|
'height': int_or_none(fmt.get('height')),
|
||||||
'quality': q(quality),
|
'quality': q(quality),
|
||||||
'tbr': float_or_none(fmt.get(
|
'tbr': tbr,
|
||||||
'averageBitrate') or fmt.get('bitrate'), 1000),
|
|
||||||
'url': fmt_url,
|
'url': fmt_url,
|
||||||
'width': fmt.get('width'),
|
'width': fmt.get('width'),
|
||||||
}
|
}
|
||||||
@ -1538,7 +1562,13 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
if mobj:
|
if mobj:
|
||||||
dct['ext'] = mimetype2ext(mobj.group(1))
|
dct['ext'] = mimetype2ext(mobj.group(1))
|
||||||
dct.update(parse_codecs(mobj.group(2)))
|
dct.update(parse_codecs(mobj.group(2)))
|
||||||
if dct.get('acodec') == 'none' or dct.get('vcodec') == 'none':
|
no_audio = dct.get('acodec') == 'none'
|
||||||
|
no_video = dct.get('vcodec') == 'none'
|
||||||
|
if no_audio:
|
||||||
|
dct['vbr'] = tbr
|
||||||
|
if no_video:
|
||||||
|
dct['abr'] = tbr
|
||||||
|
if no_audio or no_video:
|
||||||
dct['downloader_options'] = {
|
dct['downloader_options'] = {
|
||||||
# Youtube throttles chunks >~10M
|
# Youtube throttles chunks >~10M
|
||||||
'http_chunk_size': 10485760,
|
'http_chunk_size': 10485760,
|
||||||
@ -1735,7 +1765,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
'artist': mobj.group('clean_artist') or ', '.join(a.strip() for a in mobj.group('artist').split('·')),
|
'artist': mobj.group('clean_artist') or ', '.join(a.strip() for a in mobj.group('artist').split('·')),
|
||||||
'track': mobj.group('track').strip(),
|
'track': mobj.group('track').strip(),
|
||||||
'release_date': release_date,
|
'release_date': release_date,
|
||||||
'release_year': int(release_year),
|
'release_year': int_or_none(release_year),
|
||||||
})
|
})
|
||||||
|
|
||||||
initial_data = None
|
initial_data = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user