tterb / yt2mp3

:arrow_down: Search, Download, and Convert YouTube videos to MP3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cant figure out how it downloads

sdushantha opened this issue Β· comments

Hi,

I looked through the code many time and i see that you are using bs4 which means that the download url should be some where in the web page right? Or are you some 1337 hax0r? πŸ˜† .

But when I look through the source code of a youtube video, i cant really find where this download url is.

Could you be so kind and please explain how this program downloads/extracts the video?

Unfortunately, there are no 1337 hax0r tricks here.

The program uses the Pytube package to download the .mp4 video file. For more info, you can checkout the code in the programs download() function.
bs4 is primarily used to retrieve the video URL for a song if the user provides an artist/track name rather than a YouTube URL.

Oh ok thanks :)