mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-29 19:47:54 +01:00
[dlive] Add useful error message
This commit is contained in:
parent
d9d3098675
commit
b3e08a36e9
@ -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(
|
||||||
|
Loading…
Reference in New Issue
Block a user