JuanBindez / pytubefix

Python3 library for downloading YouTube Videos.
https://pytubefix.readthedocs.io
MIT License
722 stars 100 forks source link

videoDetails is missing author metadata #347

Open elulcao opened 17 hours ago

elulcao commented 17 hours ago

Describe the bug video.vid_info.get("videoDetails") data structure is missing the "author" metadata.


code that was used that resulted in the bug

from pytubefix import YouTube as YT

        try:

            video = YT(
                "https://www.youtube.com/watch?v=4vll0yZqaM8",
                use_oauth=True,
                allow_oauth_cache=True,
                on_progress_callback=on_progress,
            )

            video_id = video.video_id
            video_title = video.title
            video_author = video.author
            video_dir = DOWNLOAD_DIR + video_author

            if video_id in get_downloaded_videos():
                print("Skipping already downloaded: ", video_id)
                time.sleep(1)
                continue

            print(video.vid_info.get("videoDetails"))

Expected behavior The video.author property should contain the Youtube author instead of unknown


Screenshots

0 - https://www.youtube.com/watch?v=4vll0yZqaM8
{
      'videoId': '4vll0yZqaM8', 
      'lengthSeconds': '198', 
      'channelId': 'UCzfmH125g6CpiNGvgEasY1w', 
      'isOwnerViewing': False, 
      'isCrawlable': True, 
      'thumbnail': {
            'thumbnails': [
                  {
                        'url': 'https: //i.ytimg.com/vi/4vll0yZqaM8/hqdefault.jpg?v=673a028c', 
                        'width': 480, 
                        'height': 360
                  }
            ]
      }, 
      'allowRatings': True, 
      'isLowLatencyLiveStream': False, 
      'isPrivate': False, 
      'isUnpluggedCorpus': False, 
      'latencyClass': 
      'MDE_STREAM_OPTIMIZATIONS_RENDERER_LATENCY_NORMAL', 
      'isLiveContent': False
}

Desktop (please complete the following information):


Additional context pytubefix was working fine in previous versions where the author metadata was different than unknown