- # Test video URLs beforehand as some of them are invalid
- try:
- self._request_webpage(
- HEADRequest(video_url), video_id,
- 'Checking %s video URL' % format_id)
- except ExtractorError as e:
- if isinstance(e.cause, compat_HTTPError) and e.cause.code == 404:
- self.report_warning(
- '%s video URL is invalid, skipping' % format_id, video_id)
- continue