@@ -48,7 +48,7 @@ def _schema_config(config):
48
48
{
49
49
"cdns" : {
50
50
str : validate .all (
51
- {"url" : validate .url ()},
51
+ {validate . optional ( "url" ) : validate .url ()},
52
52
validate .get ("url" ),
53
53
),
54
54
},
@@ -64,7 +64,7 @@ def _schema_config(config):
64
64
validate .optional ("progressive" ): [
65
65
validate .all (
66
66
{
67
- "url" : validate .url (),
67
+ validate . optional ( "url" ) : validate .url (),
68
68
"quality" : str ,
69
69
},
70
70
validate .union_get ("quality" , "url" ),
@@ -74,7 +74,7 @@ def _schema_config(config):
74
74
validate .optional ("text_tracks" ): [
75
75
validate .all (
76
76
{
77
- "url" : str ,
77
+ validate . optional ( "url" ) : str ,
78
78
"lang" : str ,
79
79
},
80
80
validate .union_get ("lang" , "url" ),
@@ -218,11 +218,15 @@ def _get_streams(self):
218
218
219
219
hls = hls or {}
220
220
for url in hls .values ():
221
+ if not url :
222
+ continue
221
223
streams .extend (HLSStream .parse_variant_playlist (self .session , url ).items ())
222
224
break
223
225
224
226
dash = dash or {}
225
227
for url in dash .values ():
228
+ if not url :
229
+ continue
226
230
p = urlparse (url )
227
231
if p .path .endswith ("dash.mpd" ):
228
232
# LIVE
@@ -240,12 +244,14 @@ def _get_streams(self):
240
244
streams .extend (
241
245
(quality , HTTPStream (self .session , url ))
242
246
for quality , url in progressive or []
247
+ if url
243
248
)
244
249
245
250
if text_tracks and self .session .get_option ("mux-subtitles" ):
246
251
substreams = {
247
252
lang : HTTPStream (self .session , urljoin ("https://vimeo.com/" , url ))
248
253
for lang , url in text_tracks
254
+ if url
249
255
}
250
256
for quality , stream in streams :
251
257
yield quality , MuxedStream (self .session , stream , subtitles = substreams )
0 commit comments