From: Skullheadx <704277@pdsb.net> Date: Mon, 26 Dec 2022 01:09:01 +0000 (-0500) Subject: Youtuber Downloader X-Git-Url: http://git.skullheadx.com/nixos/static/git-logo.png?a=commitdiff_plain;h=22b1c95c390dde6d12ecb2cc45adf98b73cb7733;p=youtube-downloader.git Youtuber Downloader --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0094b45 --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +.idea/ +examples.txt + diff --git a/dependencies.txt b/dependencies.txt new file mode 100644 index 0000000..cd5e770 --- /dev/null +++ b/dependencies.txt @@ -0,0 +1 @@ +pytube diff --git a/links_file.txt b/links_file.txt new file mode 100644 index 0000000..e69de29 diff --git a/main.py b/main.py new file mode 100644 index 0000000..05c1ce4 --- /dev/null +++ b/main.py @@ -0,0 +1,22 @@ +from pytube import YouTube + +SAVE_PATH = "D:/Youtube/CodingClub/" + +with open('links_file.txt', 'r') as f: + links = f.read().split('\n') + if links[-1] == "": + links = links[:-1] + + +def download(link): + yt = YouTube(link) + mp4_files = yt.streams.filter(file_extension="mp4") + mp4_files = mp4_files.get_highest_resolution() + mp4_files.download(output_path=SAVE_PATH) + print("Download is completed successfully") + + +for i in links: + download(i) + +print('Videos Downloaded!')