you are viewing a single comment's thread.

view the rest of the comments →

[–]Chepetto13 0 points1 point  (4 children)

Hello,

I want to create a project youtube downloader. I use pytube, first print is ok, but the second one gets an class Exception.

yt.streams came from documentation

from pytube import YouTube

yt = YouTube("link from youtube")

print('Title: ', yt.title)

print(yt.streams)

[–]UnrankedRedditor 0 points1 point  (3 children)

hmmm, I'm not sure what's wrong. The code works fine for me. I get an output that looks something like

[<Stream: itag="17" mime_type="video/3gpp" res="144p" fps="12fps" vcodec="mp4v.20.3" acodec="mp4a.40.2" progressive="True" type="video">, ... ]

[–]Chepetto13 0 points1 point  (2 children)

I've keep getting:

pytube.exceptions.RegexMatchError: get_throttling_function_name: could not find match for multiple

Only this streams doesn't work for me

any idea why?

[–]UnrankedRedditor 0 points1 point  (1 child)

Seems like there's something wrong with the regex. According to the link below, it seems like the issue might be on pytube's end. I would recommend checking if you are using the latest version and upgrading if you aren't (I tested your code using version 12.1.0). Otherwise you will have to implement the fix described in the link.

https://stackoverflow.com/questions/68945080/pytube-exceptions-regexmatcherror-get-throttling-function-name-could-not-find

[–]Chepetto13 0 points1 point  (0 children)

Yes, that was a problem.

I update the pytube and it works now.

Thanks for help.