1
mirror of https://github.com/yt-dlp/yt-dlp synced 2024-12-26 15:43:47 +01:00

[tubi] Raise "no video formats" error when video url is empty

Related: #266
This commit is contained in:
pukkandan 2021-04-24 17:52:33 +05:30
parent bbed5763f1
commit cf9d6cfb0c
No known key found for this signature in database
GPG Key ID: 0F00D95A001F4698

View File

@ -81,8 +81,12 @@ class TubiTvIE(InfoExtractor):
'http://tubitv.com/oz/videos/%s/content' % video_id, video_id) 'http://tubitv.com/oz/videos/%s/content' % video_id, video_id)
title = video_data['title'] title = video_data['title']
formats = []
url = video_data['url']
# URL can be sometimes empty. Does this only happen when there is DRM?
if url:
formats = self._extract_m3u8_formats( formats = self._extract_m3u8_formats(
self._proto_relative_url(video_data['url']), self._proto_relative_url(url),
video_id, 'mp4', 'm3u8_native') video_id, 'mp4', 'm3u8_native')
self._sort_formats(formats) self._sort_formats(formats)