mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-27 16:56:30 +02:00
[ie] Fix deprecated re.split
positional arg (3.13)
Authored by: bashonly
This commit is contained in:
parent
adb148358e
commit
c91b90520f
@ -101,7 +101,7 @@ def _real_extract(self, url):
|
||||
site_name = self._og_search_property('site_name', webpage, fatal=False, default='Česká televize')
|
||||
playlist_title = self._og_search_title(webpage, default=None)
|
||||
if site_name and playlist_title:
|
||||
playlist_title = re.split(r'\s*[—|]\s*%s' % (site_name, ), playlist_title, 1)[0]
|
||||
playlist_title = re.split(r'\s*[—|]\s*%s' % (site_name, ), playlist_title, maxsplit=1)[0]
|
||||
playlist_description = self._og_search_description(webpage, default=None)
|
||||
if playlist_description:
|
||||
playlist_description = playlist_description.replace('\xa0', ' ')
|
||||
|
@ -3526,7 +3526,7 @@ def _parse_jwplayer_formats(self, jwplayer_sources_data, video_id=None,
|
||||
# See com/longtailvideo/jwplayer/media/RTMPMediaProvider.as
|
||||
# of jwplayer.flash.swf
|
||||
rtmp_url_parts = re.split(
|
||||
r'((?:mp4|mp3|flv):)', source_url, 1)
|
||||
r'((?:mp4|mp3|flv):)', source_url, maxsplit=1)
|
||||
if len(rtmp_url_parts) == 3:
|
||||
rtmp_url, prefix, play_path = rtmp_url_parts
|
||||
a_format.update({
|
||||
|
@ -134,7 +134,7 @@ def _make_playlist_result(self, url):
|
||||
title = re.split(
|
||||
r'(?i)\s*\|\s*ThisVid\.com\s*$',
|
||||
self._og_search_title(webpage, default=None)
|
||||
or self._html_search_regex(r'(?s)<title\b[^>]*>(.+?)</title', webpage, 'title', fatal=False) or '', 1)[0] or None
|
||||
or self._html_search_regex(r'(?s)<title\b[^>]*>(.+?)</title', webpage, 'title', fatal=False) or '', maxsplit=1)[0] or None
|
||||
|
||||
return self.playlist_from_matches(
|
||||
self._generate_playlist_entries(url, playlist_id, webpage),
|
||||
|
Loading…
Reference in New Issue
Block a user