JuanBindez/pytubefix

Problem getting the title of private videos with YouTube.title in version 1.8.3

Closed this issue · 2 comments

I'm using version 1.8.3.

Attempting to retrieve the title of a private video using the following code returns either nothing or an empty string:

from pytubefix import YouTube

youtube = YouTube(url)
video_title = youtube.title

print(video_title)

Expected behaviour:
The 'youtube.title' method should return the title of the video, regardless of whether it has an age restriction or any other access restriction.

Additional Details:
I haven't tested this scenario with other error types such as "AgeRestrictedError", "MembersOnly", etc.

I'm using version 1.8.3.

Attempting to retrieve the title of a private video using the following code returns either nothing or an empty string:

from pytubefix import YouTube

youtube = YouTube(url)
video_title = youtube.title

print(video_title)

Expected behaviour: The 'youtube.title' method should return the title of the video, regardless of whether it has an age restriction or any other access restriction.

Additional Details: I haven't tested this scenario with other error types such as "AgeRestrictedError", "MembersOnly", etc.

Hello, it has already been tested, there is no problem with the library, what happens is that Youtube blocks the connection when the user-agent is missing, that is, it does not identify you as a real user, you need to authenticate to return the title.

OK, Thank you very much