Skip to content

Commit

Permalink
[CI] auto update yt_dlp to upstream commit c54ddfba0f7d68034339426223…
Browse files Browse the repository at this point in the history
…d75373c5fc86df
  • Loading branch information
github-actions[bot] committed Sep 24, 2023
1 parent 06c3515 commit c4072d3
Show file tree
Hide file tree
Showing 30 changed files with 1,075 additions and 332 deletions.
22 changes: 7 additions & 15 deletions lib/yt_dlp/YoutubeDL.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
get_postprocessor,
)
from .postprocessor.ffmpeg import resolve_mapping as resolve_recode_mapping
from .update import REPOSITORY, current_git_head, detect_variant
from .update import REPOSITORY, _get_system_deprecation, current_git_head, detect_variant
from .utils import (
DEFAULT_OUTTMPL,
IDENTITY,
Expand Down Expand Up @@ -239,9 +239,9 @@ class YoutubeDL:
'selected' (check selected formats),
or None (check only if requested by extractor)
paths: Dictionary of output paths. The allowed keys are 'home'
'temp' and the keys of OUTTMPL_TYPES (in utils.py)
'temp' and the keys of OUTTMPL_TYPES (in utils/_utils.py)
outtmpl: Dictionary of templates for output names. Allowed keys
are 'default' and the keys of OUTTMPL_TYPES (in utils.py).
are 'default' and the keys of OUTTMPL_TYPES (in utils/_utils.py).
For compatibility with youtube-dl, a single string can also be used
outtmpl_na_placeholder: Placeholder for unavailable meta fields.
restrictfilenames: Do not allow "&" and spaces in file names
Expand Down Expand Up @@ -422,7 +422,7 @@ class YoutubeDL:
asked whether to download the video.
- Raise utils.DownloadCancelled(msg) to abort remaining
downloads when a video is rejected.
match_filter_func in utils.py is one example for this.
match_filter_func in utils/_utils.py is one example for this.
color: A Dictionary with output stream names as keys
and their respective color policy as values.
Can also just be a single color policy,
Expand Down Expand Up @@ -640,17 +640,9 @@ def process_color_policy(stream):
for name, stream in self._out_files.items_ if name != 'console'
})

# The code is left like this to be reused for future deprecations
MIN_SUPPORTED, MIN_RECOMMENDED = (3, 7), (3, 7)
current_version = sys.version_info[:2]
if current_version < MIN_RECOMMENDED:
msg = ('Support for Python version %d.%d has been deprecated. '
'See https://github.com/yt-dlp/yt-dlp/issues/3764 for more details.'
'\n You will no longer receive updates on this version')
if current_version < MIN_SUPPORTED:
msg = 'Python version %d.%d is no longer supported'
self.deprecated_feature(
f'{msg}! Please update to Python %d.%d or above' % (*current_version, *MIN_RECOMMENDED))
system_deprecation = _get_system_deprecation()
if system_deprecation:
self.deprecated_feature(system_deprecation.replace('\n', '\n '))

if self.params.get('allow_unplayable_formats'):
self.report_warning(
Expand Down
2 changes: 1 addition & 1 deletion lib/yt_dlp/compat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def compat_etree_fromstring(text):
if compat_os_name == 'nt':
def compat_shlex_quote(s):
import re
return s if re.match(r'^[-_\w./]+$', s) else '"%s"' % s.replace('"', '\\"')
return s if re.match(r'^[-_\w./]+$', s) else s.replace('"', '""').join('""')
else:
from shlex import quote as compat_shlex_quote # noqa: F401

Expand Down
2 changes: 1 addition & 1 deletion lib/yt_dlp/compat/urllib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# flake8: noqa: F405
from urllib import * # noqa: F403

del request
del request # noqa: F821
from . import request # noqa: F401

from ..compat_utils import passthrough_module
Expand Down
19 changes: 15 additions & 4 deletions lib/yt_dlp/extractor/_extractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,6 @@
ArteTVCategoryIE,
)
from .arnes import ArnesIE
from .asiancrush import (
AsianCrushIE,
AsianCrushPlaylistIE,
)
from .atresplayer import AtresPlayerIE
from .atscaleconf import AtScaleConfEventIE
from .atttechchannel import ATTTechChannelIE
Expand Down Expand Up @@ -275,6 +271,10 @@
BrightcoveLegacyIE,
BrightcoveNewIE,
)
from .brilliantpala import (
BrilliantpalaElearnIE,
BrilliantpalaClassesIE,
)
from .businessinsider import BusinessInsiderIE
from .bundesliga import BundesligaIE
from .buzzfeed import BuzzFeedIE
Expand Down Expand Up @@ -358,6 +358,10 @@
from .cinchcast import CinchcastIE
from .cinemax import CinemaxIE
from .cinetecamilano import CinetecaMilanoIE
from .cineverse import (
CineverseIE,
CineverseDetailsIE,
)
from .ciscolive import (
CiscoLiveSessionIE,
CiscoLiveSearchIE,
Expand Down Expand Up @@ -1126,6 +1130,7 @@
MofosexEmbedIE,
)
from .mojvideo import MojvideoIE
from .monstercat import MonstercatIE
from .morningstar import MorningstarIE
from .motherless import (
MotherlessIE,
Expand Down Expand Up @@ -1298,6 +1303,11 @@
NineCNineMediaIE,
CPTwentyFourIE,
)
from .niconicochannelplus import (
NiconicoChannelPlusIE,
NiconicoChannelPlusChannelVideosIE,
NiconicoChannelPlusChannelLivesIE,
)
from .ninegag import NineGagIE
from .ninenow import NineNowIE
from .nintendo import NintendoIE
Expand Down Expand Up @@ -1451,6 +1461,7 @@
from .phoenix import PhoenixIE
from .photobucket import PhotobucketIE
from .piapro import PiaproIE
from .piaulizaportal import PIAULIZAPortalIE
from .picarto import (
PicartoIE,
PicartoVodIE,
Expand Down
1 change: 0 additions & 1 deletion lib/yt_dlp/extractor/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ class ABCIViewIE(InfoExtractor):
_VALID_URL = r'https?://iview\.abc\.net\.au/(?:[^/]+/)*video/(?P<id>[^/?#]+)'
_GEO_COUNTRIES = ['AU']

# ABC iview programs are normally available for 14 days only.
_TESTS = [{
'url': 'https://iview.abc.net.au/show/gruen/series/11/video/LE1927H001S00',
'md5': '67715ce3c78426b11ba167d875ac6abf',
Expand Down
2 changes: 1 addition & 1 deletion lib/yt_dlp/extractor/arte.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def _real_extract(self, url):
)))

short_label = traverse_obj(stream_version, 'shortLabel', expected_type=str, default='?')
if stream['protocol'].startswith('HLS'):
if 'HLS' in stream['protocol']:
fmts, subs = self._extract_m3u8_formats_and_subtitles(
stream['url'], video_id=video_id, ext='mp4', m3u8_id=stream_version_code, fatal=False)
for fmt in fmts:
Expand Down
196 changes: 0 additions & 196 deletions lib/yt_dlp/extractor/asiancrush.py

This file was deleted.

Loading

0 comments on commit c4072d3

Please sign in to comment.