def download_lecture(self, lecture, filepath, current, total, quality):
        """This function will simply download the lectures.."""
        if quality and lecture:
            lecture = lecture.get_quality(quality)
        if lecture:
            title = lecture.title
            logger.info(
                msg=f"Lecture(s) : ({current} of {total})", new_line=True, before=True
            )
            logger.info(msg=f"Downloading ({title})", new_line=True)
            try:
                retval = lecture.download(
                    filepath=filepath,
                    quiet=True,
                    callback=self.show_progress,
                )
                msg = retval.get("msg")
                if msg == "already downloaded":
                    logger.already_downloaded(msg=f"Lecture : '{title}'")
                elif msg == "download":
                    logger.info(msg=f"Downloaded  ({title})", new_line=True)
                else:
                    logger.download_skipped(msg=f"Lecture : '{title}' ", reason=msg)
            except KeyboardInterrupt:
                logger.error(msg="User Interrupted..", new_line=True)
                sys.exit(0)
This function will simply download the lectures..
udemy-dl.py