mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-08-29 07:11:38 +03:00
[cleanup] Remove obsolete Python compatibility code (#17357)
Authored by: doe1080
This commit is contained in:
@@ -432,29 +432,28 @@ class InfoExtractor:
|
||||
|
||||
chapter: Name or title of the chapter the video belongs to.
|
||||
chapter_number: Number of the chapter the video belongs to, as an integer.
|
||||
chapter_id: Id of the chapter the video belongs to, as a unicode string.
|
||||
chapter_id: Id of the chapter the video belongs to.
|
||||
|
||||
The following fields should only be used when the video is an episode of some
|
||||
series, programme or podcast:
|
||||
|
||||
series: Title of the series or programme the video episode belongs to.
|
||||
series_id: Id of the series or programme the video episode belongs to, as a unicode string.
|
||||
series_id: Id of the series or programme the video episode belongs to.
|
||||
season: Title of the season the video episode belongs to.
|
||||
season_number: Number of the season the video episode belongs to, as an integer.
|
||||
season_id: Id of the season the video episode belongs to, as a unicode string.
|
||||
season_id: Id of the season the video episode belongs to.
|
||||
episode: Title of the video episode. Unlike mandatory video title field,
|
||||
this field should denote the exact title of the video episode
|
||||
without any kind of decoration.
|
||||
episode_number: Number of the video episode within a season, as an integer.
|
||||
episode_id: Id of the video episode, as a unicode string.
|
||||
episode_id: Id of the video episode.
|
||||
|
||||
The following fields should only be used when the media is a track or a part of
|
||||
a music album:
|
||||
|
||||
track: Title of the track.
|
||||
track_number: Number of the track within an album or a disc, as an integer.
|
||||
track_id: Id of the track (useful in case of custom indexing, e.g. 6.iii),
|
||||
as a unicode string.
|
||||
track_id: Id of the track (useful for custom indexing, e.g. 6.iii).
|
||||
artists: List of artists of the track.
|
||||
composers: List of composers of the piece.
|
||||
genres: List of genres of the track.
|
||||
@@ -487,7 +486,7 @@ class InfoExtractor:
|
||||
creator: Use "creators" instead.
|
||||
The creator of the video.
|
||||
|
||||
Unless mentioned otherwise, the fields should be Unicode strings.
|
||||
Unless mentioned otherwise, the fields should be strings.
|
||||
|
||||
Unless mentioned otherwise, None is equivalent to absence of information.
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ class ITVIE(InfoExtractor):
|
||||
# See: https://github.com/yt-dlp/yt-dlp/issues/986
|
||||
platform_tag_subs, featureset_subs = next(
|
||||
((platform_tag, featureset)
|
||||
for platform_tag, featuresets in reversed(list(variants.items())) for featureset in featuresets
|
||||
for platform_tag, featuresets in reversed(variants.items()) for featureset in featuresets
|
||||
if try_get(featureset, lambda x: x[2]) == 'outband-webvtt'),
|
||||
(None, None))
|
||||
|
||||
@@ -143,7 +143,7 @@ class ITVIE(InfoExtractor):
|
||||
# See: https://github.com/yt-dlp/yt-dlp/issues/986
|
||||
platform_tag_video, featureset_video = next(
|
||||
((platform_tag, featureset)
|
||||
for platform_tag, featuresets in reversed(list(variants.items())) for featureset in featuresets
|
||||
for platform_tag, featuresets in reversed(variants.items()) for featureset in featuresets
|
||||
if set(try_get(featureset, lambda x: x[:2]) or []) == {'aes', 'hls'}),
|
||||
(None, None))
|
||||
if not platform_tag_video or not featureset_video:
|
||||
|
||||
@@ -76,7 +76,7 @@ class YoutubeIEContentProviderLogger(IEContentProviderLogger):
|
||||
if self.log_level <= self.LogLevel.ERROR:
|
||||
self.__ie._downloader.report_error(
|
||||
self._format_msg(message), is_error=False,
|
||||
tb=''.join(traceback.format_exception(None, cause, cause.__traceback__)) if cause else None)
|
||||
tb=''.join(traceback.format_exception(cause)) if cause else None)
|
||||
|
||||
|
||||
class PoTokenCache:
|
||||
|
||||
Reference in New Issue
Block a user