compat_etree_register_namespace,
)
from ..utils import (
+ determine_ext,
+ ExtractorError,
extract_attributes,
- xpath_with_ns,
- xpath_element,
- xpath_text,
int_or_none,
merge_dicts,
parse_duration,
smuggle_url,
- ExtractorError,
- determine_ext,
+ url_or_none,
+ xpath_with_ns,
+ xpath_element,
+ xpath_text,
)
for sub in subs:
if not isinstance(sub, dict):
continue
- href = sub.get('Href')
- if isinstance(href, compat_str):
+ href = url_or_none(sub.get('Href'))
+ if href:
extract_subtitle(href)
if not info.get('duration'):
info['duration'] = parse_duration(video_data.get('Duration'))