1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-29 19:47:54 +01:00

Merge branch 'dlive-errmsg'

This commit is contained in:
Barna Zsombor 2019-09-19 22:22:23 +02:00
commit 03db8693f2

View File

@ -4,7 +4,10 @@ import json
import re import re
from .common import InfoExtractor from .common import InfoExtractor
from ..utils import int_or_none from ..utils import (
int_or_none,
ExtractorError,
)
class DLiveVODIE(InfoExtractor): class DLiveVODIE(InfoExtractor):
@ -76,7 +79,14 @@ class DLiveStreamIE(InfoExtractor):
username username
} }
}''' % display_name}).encode())['data']['userByDisplayName'] }''' % display_name}).encode())['data']['userByDisplayName']
livestream = user['livestream'] livestream = user['livestream']
if(livestream is None):
raise ExtractorError(
"The requested stream is offline!",
expected=True)
title = livestream['title'] title = livestream['title']
username = user['username'] username = user['username']
formats = self._extract_m3u8_formats( formats = self._extract_m3u8_formats(