]> Skullheadx's Git Forge - youtube-downloader.git/commitdiff
Youtuber Downloader
authorSkullheadx <704277@pdsb.net>
Mon, 26 Dec 2022 01:09:01 +0000 (20:09 -0500)
committerSkullheadx <704277@pdsb.net>
Mon, 26 Dec 2022 01:09:01 +0000 (20:09 -0500)
.gitignore [new file with mode: 0644]
dependencies.txt [new file with mode: 0644]
links_file.txt [new file with mode: 0644]
main.py [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..0094b45
--- /dev/null
@@ -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 (file)
index 0000000..cd5e770
--- /dev/null
@@ -0,0 +1 @@
+pytube
diff --git a/links_file.txt b/links_file.txt
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/main.py b/main.py
new file mode 100644 (file)
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!')