mirror of
https://cdm-project.com/Download-Tools/udemy-downloader.git
synced 2025-05-01 20:44:26 +02:00
Merge branch 'master' of https://github.com/Puyodead1/udemy-downloader
This commit is contained in:
commit
69b44b9421
13
main.py
13
main.py
@ -10,7 +10,6 @@ import cloudscraper
|
|||||||
import m3u8
|
import m3u8
|
||||||
import requests
|
import requests
|
||||||
import yt_dlp
|
import yt_dlp
|
||||||
import git
|
|
||||||
from html.parser import HTMLParser as compat_HTMLParser
|
from html.parser import HTMLParser as compat_HTMLParser
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
from requests.exceptions import ConnectionError as conn_error
|
from requests.exceptions import ConnectionError as conn_error
|
||||||
@ -1294,16 +1293,6 @@ def _print_course_info(course_data):
|
|||||||
print("\n\n")
|
print("\n\n")
|
||||||
|
|
||||||
|
|
||||||
def get_version_string():
|
|
||||||
repo = git.Repo(search_parent_directories=True)
|
|
||||||
if repo:
|
|
||||||
sha = repo.head.object.hexsha
|
|
||||||
branch = repo.active_branch.name
|
|
||||||
return sha + "-git-" + branch + " (" + __version__ + ")"
|
|
||||||
else:
|
|
||||||
return __version__
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
parser = argparse.ArgumentParser(description='Udemy Downloader')
|
parser = argparse.ArgumentParser(description='Udemy Downloader')
|
||||||
parser.add_argument("-c",
|
parser.add_argument("-c",
|
||||||
@ -1390,7 +1379,7 @@ if __name__ == "__main__":
|
|||||||
help=argparse.SUPPRESS,
|
help=argparse.SUPPRESS,
|
||||||
)
|
)
|
||||||
parser.add_argument("-v", "--version", action="version",
|
parser.add_argument("-v", "--version", action="version",
|
||||||
version='You are running version {version}'.format(version=get_version_string()))
|
version='You are running version {version}'.format(version=__version__))
|
||||||
|
|
||||||
dl_assets = False
|
dl_assets = False
|
||||||
skip_lectures = False
|
skip_lectures = False
|
||||||
|
@ -12,4 +12,3 @@ yt-dlp
|
|||||||
bitstring
|
bitstring
|
||||||
cloudscraper
|
cloudscraper
|
||||||
unidecode
|
unidecode
|
||||||
gitpython
|
|
Loading…
x
Reference in New Issue
Block a user