mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-13 02:14:20 +01:00
[youtube] Return full URL instead of just ID
This commit is contained in:
parent
1009f67c2a
commit
5e3f2f8fc4
1 changed files with 3 additions and 3 deletions
|
@ -869,7 +869,7 @@ def _extract_video(self, renderer):
|
||||||
'_type': 'url',
|
'_type': 'url',
|
||||||
'ie_key': YoutubeIE.ie_key(),
|
'ie_key': YoutubeIE.ie_key(),
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'url': video_id,
|
'url': f'https://www.youtube.com/watch?v={video_id}',
|
||||||
'title': title,
|
'title': title,
|
||||||
'description': description,
|
'description': description,
|
||||||
'duration': duration,
|
'duration': duration,
|
||||||
|
@ -4284,7 +4284,7 @@ def get_mobj(url):
|
||||||
if video_id and playlist_id:
|
if video_id and playlist_id:
|
||||||
if self.get_param('noplaylist'):
|
if self.get_param('noplaylist'):
|
||||||
self.to_screen('Downloading just video %s because of --no-playlist' % video_id)
|
self.to_screen('Downloading just video %s because of --no-playlist' % video_id)
|
||||||
return self.url_result(video_id, ie=YoutubeIE.ie_key(), video_id=video_id)
|
return self.url_result(f'https://www.youtube.com/watch?v={video_id}', ie=YoutubeIE.ie_key(), video_id=video_id)
|
||||||
self.to_screen('Downloading playlist %s; add --no-playlist to just download video %s' % (playlist_id, video_id))
|
self.to_screen('Downloading playlist %s; add --no-playlist to just download video %s' % (playlist_id, video_id))
|
||||||
|
|
||||||
webpage, data = self._extract_webpage(url, item_id)
|
webpage, data = self._extract_webpage(url, item_id)
|
||||||
|
@ -4337,7 +4337,7 @@ def get_mobj(url):
|
||||||
if video_id:
|
if video_id:
|
||||||
if mobj['tab'] != '/live': # live tab is expected to redirect to video
|
if mobj['tab'] != '/live': # live tab is expected to redirect to video
|
||||||
self.report_warning('Unable to recognize playlist. Downloading just video %s' % video_id)
|
self.report_warning('Unable to recognize playlist. Downloading just video %s' % video_id)
|
||||||
return self.url_result(video_id, ie=YoutubeIE.ie_key(), video_id=video_id)
|
return self.url_result(f'https://www.youtube.com/watch?v={video_id}', ie=YoutubeIE.ie_key(), video_id=video_id)
|
||||||
|
|
||||||
raise ExtractorError('Unable to recognize tab page')
|
raise ExtractorError('Unable to recognize tab page')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue