mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-01-05 19:10:10 +09:00
Consider multi-part videos in filename output
This commit is contained in:
parent
ff47d11269
commit
d30180d4f3
@ -40,6 +40,14 @@ class RTPIE(InfoExtractor):
|
|||||||
|
|
||||||
title = self._html_search_regex(r'<title>(.+?)</title>', webpage, 'title')
|
title = self._html_search_regex(r'<title>(.+?)</title>', webpage, 'title')
|
||||||
|
|
||||||
|
# Replace irrelevant text in title
|
||||||
|
title = title.replace(' - RTP Play - RTP', '')
|
||||||
|
|
||||||
|
# Check if it's a video split in parts, if so add part number to title
|
||||||
|
part = self._html_search_regex(r'section\-parts.*<span.*>(.+?)</span>.*</ul>', webpage, 'part', default=None)
|
||||||
|
if part:
|
||||||
|
title = f'{title} {part}'
|
||||||
|
|
||||||
# Get JS object
|
# Get JS object
|
||||||
js_object = self._search_regex(r'(?s)RTPPlayer *\( *({.+?}) *\);', webpage, 'player config')
|
js_object = self._search_regex(r'(?s)RTPPlayer *\( *({.+?}) *\);', webpage, 'player config')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user