def get_info(self): ydl = YoutubeDL({"quiet": True, "prefer_insecure": True}) ydl.add_default_info_extractors() try: info = ydl.extract_info(self.url, download=False) except DownloadError: info = None return info
def get_info(self): ydl = YoutubeDL({"quiet": True, "prefer_insecure": True}) ydl.add_default_info_extractors() try: info = ydl.extract_info(self.url, download=False) except DownloadError: info = None return info
def extractYoutubeDL(self, url, video): links = {} try: from youtube_dl.YoutubeDL import YoutubeDL, ExtractorError except ImportError: util.error("no youtube-dl installed!") return links ydl = YoutubeDL({'youtube_include_dash_manifest':False}, auto_init=False) ydl.add_info_extractor(ydl.get_info_extractor("Youtube")) try: res = ydl.extract_info(url, False, ie_key="Youtube") except ExtractorError as e: util.error(str(e)) return links for e in res['formats']: links[int(e['format_id'])] = e['url'] return links
def extractYoutubeDL(self, url, video): links = {} try: from youtube_dl.YoutubeDL import YoutubeDL, ExtractorError except ImportError: util.error("no youtube-dl installed!") return links ydl = YoutubeDL({'youtube_include_dash_manifest': False}, auto_init=False) ydl.add_info_extractor(ydl.get_info_extractor("Youtube")) try: res = ydl.extract_info(url, False, ie_key="Youtube") except ExtractorError as e: util.error(str(e)) return links for e in res['formats']: links[int(e['format_id'])] = e['url'] return links