1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-01-22 12:45:36 +08:00

[LiveLeak] format_id fallback for _is_valid_url

This commit is contained in:
bitraid 2019-05-28 13:25:57 +03:00
parent f4b37e327d
commit 9ac2735305
No known key found for this signature in database
GPG Key ID: 140D99CA504654D3

View File

@ -138,9 +138,10 @@ class LiveLeakIE(InfoExtractor):
orig_url = re.sub(r'\.mp4\.[^.]+', '', a_format['url'])
if a_format['url'] != orig_url:
format_id = a_format.get('format_id')
format_id = 'original' + ('-' + format_id if format_id else '')
if self._is_valid_url(orig_url, video_id, format_id):
formats.append({
'format_id': 'original' + ('-' + format_id if format_id else ''),
'format_id': format_id,
'url': orig_url,
'preference': 1,
})