JuanBindez/pytubefix

Inconsistency in title property, prepending of author name

Closed this issue ยท 2 comments

Hi,

I've encountered an inconsistency in the title property of the video object. When attempting to access the video title, the author's name is prepended to the title string. This is not the expected behavior, especially considering a separate author property exists.

Steps to reproduce:
Create a YouTube object by passing a valid YouTube video URL.
Access the title property (e.g., yt.title).
Observe that the value returned includes the author's name, prepended to the actual title.

Expected behavior:
Accessing the title property should return only the video's title, without additional information. Users requiring the author's name should use the author property.

Commit that introduced this:
https://github.com/JuanBindez/pytubefix/blame/d3b05dc158ad61ea4f0ebe83e0d886b50318bde5/pytubefix/__main__.py#L382

Hi,

I've encountered an inconsistency in the title property of the video object. When attempting to access the video title, the author's name is prepended to the title string. This is not the expected behavior, especially considering a separate author property exists.

Steps to reproduce: Create a YouTube object by passing a valid YouTube video URL. Access the title property (e.g., yt.title). Observe that the value returned includes the author's name, prepended to the actual title.

Expected behavior: Accessing the title property should return only the video's title, without additional information. Users requiring the author's name should use the author property.

Commit that introduced this: https://github.com/JuanBindez/pytubefix/blame/d3b05dc158ad61ea4f0ebe83e0d886b50318bde5/pytubefix/__main__.py#L382

Hi Sam, test it now and see if it is normal, I already did the tests here and the return is normal now (returning only the title of the video and not the author).

Pulled the new version and can confirm the title is working correctly.

This was what I made using the library - Thanks again
https://gist.github.com/Maddest-Lad/46ccf7b5e6938709003ba26e8fe9c036