mirror of https://github.com/yt-dlp/yt-dlp.git
[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 @@ class CeskaTelevizeIE(InfoExtractor):
|
||||||
site_name = self._og_search_property('site_name', webpage, fatal=False, default='Česká televize')
|
site_name = self._og_search_property('site_name', webpage, fatal=False, default='Česká televize')
|
||||||
playlist_title = self._og_search_title(webpage, default=None)
|
playlist_title = self._og_search_title(webpage, default=None)
|
||||||
if site_name and playlist_title:
|
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)
|
playlist_description = self._og_search_description(webpage, default=None)
|
||||||
if playlist_description:
|
if playlist_description:
|
||||||
playlist_description = playlist_description.replace('\xa0', ' ')
|
playlist_description = playlist_description.replace('\xa0', ' ')
|
||||||
|
|
|
@ -3526,7 +3526,7 @@ class InfoExtractor:
|
||||||
# See com/longtailvideo/jwplayer/media/RTMPMediaProvider.as
|
# See com/longtailvideo/jwplayer/media/RTMPMediaProvider.as
|
||||||
# of jwplayer.flash.swf
|
# of jwplayer.flash.swf
|
||||||
rtmp_url_parts = re.split(
|
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:
|
if len(rtmp_url_parts) == 3:
|
||||||
rtmp_url, prefix, play_path = rtmp_url_parts
|
rtmp_url, prefix, play_path = rtmp_url_parts
|
||||||
a_format.update({
|
a_format.update({
|
||||||
|
|
|
@ -134,7 +134,7 @@ class ThisVidPlaylistBaseIE(InfoExtractor):
|
||||||
title = re.split(
|
title = re.split(
|
||||||
r'(?i)\s*\|\s*ThisVid\.com\s*$',
|
r'(?i)\s*\|\s*ThisVid\.com\s*$',
|
||||||
self._og_search_title(webpage, default=None)
|
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(
|
return self.playlist_from_matches(
|
||||||
self._generate_playlist_entries(url, playlist_id, webpage),
|
self._generate_playlist_entries(url, playlist_id, webpage),
|
||||||
|
|
Loading…
Reference in New Issue