CrazyDownloads.py | Journal #3

Junior Developer Journal
3 min readOct 13, 2023

--

So I like listening to music and making music. And I make remixes so I need music to remix right? Where do I get this music? Spotify, no. Deezer, no. SoundCloud, no. YouTube, yes. But I cant do youtube.com/video-I-want/download. So I need a solution! Let me just search YouTube video download.

Not giving you guys website name because you know.

NO I am not lazy. Just kidding I am! That's why I am programming it in python.

HOW CAN I USE THIS??

  1. Scroll To the bottom of this blog then click the GitHub Repo.
  2. Go to CrazyDownloads.py
  3. Copy the code into your IDE
  4. Make Sure You Have A disc ‘D’ if you don’t I will talk about this later
  5. Run Your Code
  6. It will ask you: Enter the video URL:
  7. Go to YouTube and copy your video URL then enter it.
  8. It will ask you: Download as an MP3? (yes/no):
  9. If you want it as an Mp3 then say ‘yes’ if you don’t then enter ‘no’
  10. It will ask you: Enter the file name with extension that you desire:
  11. THIS IS IMPORTANT! Enter a name for your video. Then the important part is: If on step 9 you said ‘yes’ then add .mp3 to your name if you said ‘no’ add .mp4 to your name.
  12. If you get an error like this: An error occurred: regex_search: could not find match for (?:v=|\/)([0–9A-Za-z_-]{11}).* that means your URL is not valid. But if it downloaded it should say ‘Download Completed’

I want to download my Video into another folder OR I don't have Disk D:

(If you changed the script that may have changed the instructions for you)
Steps for Not Having Disk D:
1. Go to Line 41
2. Change download_directory = r’D:\’ to wherever you want it to go. So if you want it to go to disk C change it to this ‘download_directory = r’C:\’’
Most popular extension: download_directory = r’C:\Users\My-Windows-User\CrazyDownloads’ You need to make a Folder Called exactly ‘CrazyDownloads’ for this and change ‘My-Windows-User’ to your username on windows

Steps for changing folder:
1. Go to Line 41
2. Go To Disk D or whatever you changed your disk to.
3. Make a Folder Called whatever you want
4. Then on Line 41 Change ‘download_directory = r’D:\’’ to ‘download_directory = r’D:\Folder-Name-You-Made’’
5. Change ‘Folder-Name-You-Made’ to the Folder name you made (Well duh you guys aren’t stupid haha)

Hopefully This Tutorial Helped. It was really fun to make. Obviously this is malware free( Like Always ). I also hope you can use this and that i explained how you can change directories. The links will Probably be below :)

LINKS:

Subscribe To Junior Dev Journal: Subscribe! Journal #3
GitHub Repo: GitHub Repo | Journal #3

--

--

Junior Developer Journal
Junior Developer Journal

Written by Junior Developer Journal

Hello! I am a developer! I program with Python and yeah! Thats it! Hope you enjoy my DevLogs.

No responses yet