1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2026-02-23 08:56:25 +00:00

[cleanup] Misc

This commit is contained in:
pukkandan
2023-02-28 23:31:02 +05:30
parent 31e183557f
commit 5b28cef72d
16 changed files with 212 additions and 203 deletions

View File

@@ -3527,7 +3527,7 @@ class InfoExtractor:
desc = ''
if cls._NETRC_MACHINE:
if markdown:
desc += f' [<abbr title="netrc machine"><em>{cls._NETRC_MACHINE}</em></abbr>]'
desc += f' [*{cls._NETRC_MACHINE}*](## "netrc machine")'
else:
desc += f' [{cls._NETRC_MACHINE}]'
if cls.IE_DESC is False:

View File

@@ -956,7 +956,7 @@ class YoutubeBaseInfoExtractor(InfoExtractor):
@staticmethod
def is_music_url(url):
return re.match(r'https?://music\.youtube\.com/', url) is not None
return re.match(r'(https?://)?music\.youtube\.com/', url) is not None
def _extract_video(self, renderer):
video_id = renderer.get('videoId')
@@ -6211,6 +6211,8 @@ class YoutubeTabIE(YoutubeTabBaseInfoExtractor):
original_tab_id, display_id = tab[1:], f'{item_id}{tab}'
if is_channel and not tab and 'no-youtube-channel-redirect' not in compat_opts:
url = f'{pre}/videos{post}'
if smuggled_data.get('is_music_url'):
self.report_warning(f'YouTube Music is not directly supported. Redirecting to {url}')
# Handle both video/playlist URLs
qs = parse_qs(url)