def download_subtitles(self, subtitles, filepath, language="en", keep_vtt=False):
        """This function will simply download the subtitles.."""
        if language and subtitles and language != "all":
            subtitle = subtitles[0]
            subtitles = subtitle.get_subtitle(language)
        if subtitles:
            for sub in subtitles:
                title = f"{sub.title}.{sub.language}"
                filename = os.path.join(filepath, sub.filename)
                logger.info(msg="Downloading subtitle(s)", new_line=True, before=True)
                logger.info(msg=f"Downloading ({title})", new_line=True)
                try:
                    retval = sub.download(
                        filepath=filepath,
                        quiet=True,
                        callback=self.show_progress,
                    )
                    msg = retval.get("msg")
                    if msg == "already downloaded":
                        logger.already_downloaded(msg=f"Subtitle : '{title}'")
                    elif msg == "download":
                        logger.info(msg=f"Downloaded  ({title})", new_line=True)
                        self.convert(filename=filename, keep_vtt=keep_vtt)
                    else:
                        logger.download_skipped(
                            msg=f"Subtitle : '{title}' ", reason=msg
                        )
                except KeyboardInterrupt:
                    logger.error(msg="User Interrupted..", new_line=True)
                    sys.exit(0)
This function will simply download the subtitles..
udemy-dl.py