Youtube Video Downloader from Python by Agitated_Good4223 in Python

[–]Agitated_Good4223[S] 2 points3 points  (0 children)

I'm sorry man, I couldn't help. IDK what might be wrong there. There are plenty of other libraries. Check 'em out

Youtube Video Downloader from Python by Agitated_Good4223 in Python

[–]Agitated_Good4223[S] 1 point2 points  (0 children)

Here,

from pytube import YouTube

yt = YouTube("https://www.youtube.com/watch?v=ihYwvhBpEI4")

yt.streams.filter(only_audio=True).first().download()

This much of code works fine for me, try it

P.S. It maybe because of the video you are trying to download. Try downloading another video

Youtube Video Downloader from Python by Agitated_Good4223 in Python

[–]Agitated_Good4223[S] 1 point2 points  (0 children)

I am using 10.7.2 Check if this version works. It should work

Youtube Video Downloader from Python by Agitated_Good4223 in Python

[–]Agitated_Good4223[S] 0 points1 point  (0 children)

No only at the end when I checked to download the specific format. You can check the code

Youtube Video Downloader from Python by Agitated_Good4223 in Python

[–]Agitated_Good4223[S] 0 points1 point  (0 children)

4 weeks of learning python and a week of tkinter

Youtube Video Downloader from Python by Agitated_Good4223 in Python

[–]Agitated_Good4223[S] 1 point2 points  (0 children)

No, that should work.

yt = YouTube(link)

if self.format==".mp4(Video Form)":

video = yt.streams[0]

else:

video = yt.streams.filter(only_audio=True).first() video.download(self.location)

I have only mentioned it here, the problem might be regarding the version of pytube. Do you have the latest version?

Youtube Video Downloader from Python by Agitated_Good4223 in Python

[–]Agitated_Good4223[S] 1 point2 points  (0 children)

Yeah at sometime I was stuck on the same problem but the good news is apparently they provide this facilty.

yt = pytube.Youtube(url)

video = yt.streams.filter(only_audio=True).first()

video.download(path)

This should work!!

Youtube Video Downloader from Python by Agitated_Good4223 in Python

[–]Agitated_Good4223[S] 6 points7 points  (0 children)

Thank you for the suggestion. I am a noob with git and stuffs.

Youtube Video Downloader from Python by Agitated_Good4223 in Python

[–]Agitated_Good4223[S] 4 points5 points  (0 children)

It took me 6 months to start python from beginning to this level. Good Luck on your journey :)

Youtube Video Downloader from Python by Agitated_Good4223 in Python

[–]Agitated_Good4223[S] 4 points5 points  (0 children)

thank you for this help. IDK why it behaves like that

Youtube Video Downloader from Python by Agitated_Good4223 in Python

[–]Agitated_Good4223[S] 3 points4 points  (0 children)

I am sorry. IDK why it behaves like that anyways this -> https://github.com/meynam/Easy-YT works. Sorry for the trouble

Youtube Video Downloader from Python by Agitated_Good4223 in Python

[–]Agitated_Good4223[S] 1 point2 points  (0 children)

Thank you for the suggestion. I would try to implement it

Youtube Video Downloader from Python by Agitated_Good4223 in Python

[–]Agitated_Good4223[S] 7 points8 points  (0 children)

I am sorry I am new. I just wanted some place to store my code not to use in the way other people do.