Youtube 2MP4 - download mp4 from youtube

 *** 공부를 위해 모든 것을 영어로... ***

""" Warning ! This program is not neat and professional ! The program is concentrated on " only audio download function " . Do not blame me if you encounter any Errors that I have not met ! """

[ Head ] Due to COVID - 19 , most of the Universitiy has implemented " online - courses " and therefore I have to find any stuffz to kill time . Somehow , I just got up with an idea of making a specific program which is quite known well among those people who are interested in " Python " or " Programming " itself .

By googling " youtube to mp3 " , you are able to see tons of websites providing both audio and video downloading functions and yet it is pretty difficult to get what you really want to get because of freaking ads , pop - ups , redirections , and so on .

Well , It is driving me crazy whenever I am led to redirections if I click on those download buttons . So I have decided to make my own YouTube download program by using Python .

Used program : PyCharm , Anaconda

[ Main ] I forgot to mention that the program is " just for Audio " not " Video " since only Audio files are required for me . It is quite easy to download videos by rewriting few lines of a source - code .

Contents 1 . Environment Preparation 1 - 1 . Programs download 1 - 2 . PyCharm project setting 2 . Source - code 3 . converting . py into . exe 4 . result

1 . Environment Preparation

1 - 1 . Programs downloadAs mentioned above , you need to prepare " Python " first ! And then , It is good to prepare PyCharm and Anaconda . * IDE is up to you .

If you have not prepared the programs , visit links pated below .

Python : https://www.python.org/downloads/PyCharm : https://www.jetbrains.com/pycharm/download/Anaconda : https://www.anaconda.com/download/

It is easy to find how to set the programs by googling . 1 - 2 . PyCharm project settingFirst of all , you have got to make a project folder that runs under a project interpreter " Anaconda Python " .

Creating New Project - File - > click New Project
Project setting - Location : Y ou can just use the default setting . It ' s up to you . - You have to click " Existing Interpreter " and then click " ... " squared - button on the right .
Anaconda Python - Click " C onda Environment " on the left - side . - You have to put Anaconda Python direction in the Interpreter box . Click " ... " squared - button and then find the Anaconda ' s Python . exe . You would be able to find it in the Anaconda 3 file . - Press ok then create the project .
Creating Python file- Right click on the project file -> New -> Python File- Now you can write a script.2. Source-codeThe source-code doesn't look so great.Class, Packages, Functions, Function variables, ... are not organized. As I told you before, I wrote the script for only "Downloading Function".3. Converting .py into .exe- Run CMD- Move on to the file directory where your script is saved.- Execute the command above . - You would see . exe in the " dist " folder .

However , with this method you would see a console screen as you run the . exe . If you want to run the . exe without the screen , you would edit the command like this . 4 . Result

Running EXEThis is what th e program looks like . You just need to copy URL of a video , paste it into the box , and click the button below . After that you just need to wait til a " Download done " message pops up . The audio file would be saved in the same directory where your . exe is . Furthermore , by putting an incorrect URL ( rather than YouTube URL ) an Error Message would come up right away .

[ Conclusion ]It is pretty amazing that we could easily extract audio files from YouTube videos by using the pytube module .

이 블로그의 인기 게시물

모바일 유튜브 광고 삭제 유튜브 vanced로 할 수 있나?

하는 이유와 방법 다육이 꽃대 자르기

list 스마일라식부작용 (0.3%