This commit is contained in:
nikili0n
2023-09-22 13:35:00 +03:00
committed by Dantenerosas
parent 79afa55e73
commit 801b9f2e52
6 changed files with 44 additions and 17 deletions

View File

@@ -20,8 +20,8 @@ class BaseParser:
"quiet": True
}
downloader = VideoDownloader(link=self.params["link"], ydl_opts=ydl_opts)
video_info = downloader.get_info()
path_to_video = f"{video_info['extractor_key']}/{video_info['id']}_{video_info['width']}p.{video_info['ext']}"
downloader.get_info()
path_to_video = f"{downloader.info['extractor_key']}/{downloader.info['id']}_{downloader.info['width']}p.{downloader.info['ext']}"
if os.path.exists(os.path.join(os.getcwd() + "/downloads/" + path_to_video)):
raise FileAlreadyExistException(message=path_to_video)
downloader.ydl_opts["quiet"] = False