import itertools
from .common import InfoExtractor
-from ..compat import (
- compat_HTTPError,
- compat_str,
-)
+from ..compat import compat_HTTPError
from ..utils import (
ExtractorError,
int_or_none,
float_or_none,
parse_iso8601,
+ url_or_none,
)
formats = []
for f in video.get('formats', []):
- format_url = f.get('uri')
- if not format_url or not isinstance(format_url, compat_str):
+ format_url = url_or_none(f.get('uri'))
+ if not format_url:
continue
format_type = f.get('type')
if format_type == 'dash':