Compare commits

...

4 Commits

4 changed files with 5 additions and 5 deletions

View File

@ -387,7 +387,7 @@ class CBCGemIE(InfoExtractor):
url = re.sub(r'(Manifest\(.*?),format=[\w-]+(.*?\))', r'\1\2', base_url) url = re.sub(r'(Manifest\(.*?),format=[\w-]+(.*?\))', r'\1\2', base_url)
secret_xml = self._download_xml(url, video_id, note='Downloading secret XML', fatal=False) secret_xml = self._download_xml(url, video_id, note='Downloading secret XML', fatal=False)
if not secret_xml: if secret_xml is None:
return return
for child in secret_xml: for child in secret_xml:

View File

@ -137,7 +137,7 @@ class MTVServicesInfoExtractor(InfoExtractor):
mediagen_doc = self._download_xml( mediagen_doc = self._download_xml(
mediagen_url, video_id, 'Downloading video urls', fatal=False) mediagen_url, video_id, 'Downloading video urls', fatal=False)
if mediagen_doc is False: if mediagen_doc is None:
return None return None
item = mediagen_doc.find('./video/item') item = mediagen_doc.find('./video/item')

View File

@ -803,8 +803,8 @@ class NBCStationsIE(InfoExtractor):
smil = self._download_xml( smil = self._download_xml(
f'https://link.theplatform.com/s/{pdk_acct}/{player_id}', video_id, f'https://link.theplatform.com/s/{pdk_acct}/{player_id}', video_id,
note='Downloading SMIL data', query=query, fatal=is_live) note='Downloading SMIL data', query=query, fatal=is_live)
subtitles = self._parse_smil_subtitles(smil, default_ns) if smil else {} subtitles = self._parse_smil_subtitles(smil, default_ns) if smil is not None else {}
for video in smil.findall(self._xpath_ns('.//video', default_ns)) if smil else []: for video in smil.findall(self._xpath_ns('.//video', default_ns)) if smil is not None else []:
info['duration'] = float_or_none(remove_end(video.get('dur'), 'ms'), 1000) info['duration'] = float_or_none(remove_end(video.get('dur'), 'ms'), 1000)
video_src_url = video.get('src') video_src_url = video.get('src')
ext = mimetype2ext(video.get('type'), default=determine_ext(video_src_url)) ext = mimetype2ext(video.get('type'), default=determine_ext(video_src_url))

View File

@ -470,7 +470,7 @@ class SlidesLiveIE(InfoExtractor):
player_info['slides_xml_url'], video_id, fatal=False, player_info['slides_xml_url'], video_id, fatal=False,
note='Downloading slides XML', errnote='Failed to download slides info') note='Downloading slides XML', errnote='Failed to download slides info')
slide_url_template = 'https://cdn.slideslive.com/data/presentations/%s/slides/big/%s%s' slide_url_template = 'https://cdn.slideslive.com/data/presentations/%s/slides/big/%s%s'
for slide_id, slide in enumerate(slides.findall('./slide') if slides else [], 1): for slide_id, slide in enumerate(slides.findall('./slide') if slides is not None else [], 1):
slides_info.append(( slides_info.append((
slide_id, xpath_text(slide, './slideName', 'name'), '.jpg', slide_id, xpath_text(slide, './slideName', 'name'), '.jpg',
int_or_none(xpath_text(slide, './timeSec', 'time')))) int_or_none(xpath_text(slide, './timeSec', 'time'))))