Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _get_stream_info(self, preinfo):
try:
return self._ydl.process_ie_result(preinfo, download=False)
except (youtube_dl.utils.ExtractorError, youtube_dl.utils.DownloadError):
raise ExtractionError("Youtube-dl extractor failed")
def _get_stream_preinfo(self, video_url):
try:
return self._ydl.extract_info(video_url, process=False)
except youtube_dl.utils.DownloadError:
raise ExtractionError("Remote resource not found")