diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-10-16 20:13:23 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-10-16 20:28:17 +0530 |
commit | 580d3274e50d9cca79189689ba53db7295ea267c (patch) | |
tree | 8ad0919cc415e4f3bce09e2452d6baa6eccbaf96 | |
parent | 03b4de722a6cf86dbcc6d17a63145ec59a573bf6 (diff) | |
download | hypervideo-pre-580d3274e50d9cca79189689ba53db7295ea267c.tar.lz hypervideo-pre-580d3274e50d9cca79189689ba53db7295ea267c.tar.xz hypervideo-pre-580d3274e50d9cca79189689ba53db7295ea267c.zip |
[youtube] Expose different formats with same itag
-rw-r--r-- | yt_dlp/downloader/common.py | 1 | ||||
-rw-r--r-- | yt_dlp/extractor/youtube.py | 9 |
2 files changed, 7 insertions, 3 deletions
diff --git a/yt_dlp/downloader/common.py b/yt_dlp/downloader/common.py index 96b78a968..9081794db 100644 --- a/yt_dlp/downloader/common.py +++ b/yt_dlp/downloader/common.py @@ -1,6 +1,5 @@ from __future__ import division, unicode_literals -import copy import os import re import time diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py index 1ef80445e..dc9aa8ab7 100644 --- a/yt_dlp/extractor/youtube.py +++ b/yt_dlp/extractor/youtube.py @@ -2692,7 +2692,9 @@ class YoutubeIE(YoutubeBaseInfoExtractor): itag = self._search_regex( r'/itag/(\d+)', f['url'], 'itag', default=None) if itag in itags: - continue + itag += '-hls' + if itag in itags: + continue if itag: f['format_id'] = itag itags.append(itag) @@ -2704,8 +2706,11 @@ class YoutubeIE(YoutubeBaseInfoExtractor): for f in self._extract_mpd_formats(dash_manifest_url, video_id, fatal=False): itag = f['format_id'] if itag in itags: - continue + itag += '-dash' + if itag in itags: + continue if itag: + f['format_id'] = itag itags.append(itag) f['quality'] = guess_quality(f) filesize = int_or_none(self._search_regex( |