minor fixes
This commit is contained in:
		@@ -24,10 +24,17 @@ class BaseParser:
 | 
			
		||||
        }
 | 
			
		||||
        downloader = VideoDownloader(link=self.params["link"], ydl_opts=ydl_opts)
 | 
			
		||||
        downloader.get_info()
 | 
			
		||||
        path_to_video = f"{downloader.info['extractor_key']}/{downloader.info['id']}_{downloader.info['resolution']}.{downloader.info['ext']}"
 | 
			
		||||
 | 
			
		||||
        if 'resolution' in downloader.info and downloader.info["resolution"]:
 | 
			
		||||
            resolution = downloader.info['resolution']
 | 
			
		||||
        else:
 | 
			
		||||
            resolution = "NA"
 | 
			
		||||
 | 
			
		||||
        path_to_video = f"{downloader.info['extractor_key']}/{downloader.info['id']}_{resolution}.{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
 | 
			
		||||
        downloader.ydl_opts["quiet"] = False
 | 
			
		||||
        downloader.download()
 | 
			
		||||
        return path_to_video
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user