Skip to content

[BUG] Channel.video_urls yields YouTube instances instead of str #577

@Jodenee

Description

@Jodenee

🛑 DO NOT REMOVE OR SKIP THIS ISSUE TEMPLATE 🛑

Issues with incomplete or missing information will be closed automatically.


🐞 Bug Description

Provide a clear and concise description of the bug.

When using the video_urls property on Channel, YouTube instances are yielded instead of strings containing video watch urls.


🔢 Code Snippet

Include the minimal code snippet that reproduces the issue.

from pytubefix import Channel, YouTube

channel_url = "https://www.youtube.com/@LiamVickersAnimation"
channel = Channel(channel_url)

for video_url in channel.video_urls:
    print(video_url) # <pytubefix.__main__.YouTube object: videoId=example>

# Temporary fix
def get_channel_video_urls(channel: Channel):
    video: YouTube
    for video in channel.video_urls:
        yield video.watch_url

for video_url in get_channel_video_urls(channel):
    print(video_url) # https://youtube.com/watch?v=example

🖥️ Environment Details

Fill in the details below about your setup:

  • Operating System: Windows 10
  • Python Version: 3.13.2
  • Pytubefix Version: 10.3.6

🚀 Next Steps

Once submitted, we will triage the issue. Make sure to respond to follow-up questions to keep the process smooth.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BUGSomething isn't working

    Projects

    Status

    waiting

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions