Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Unable to extract uploader_id

import youtube_dl

def download_youtube_video(url):
    ydl_opts = {
        'format': 'bestvideo+bestaudio/best',
        'outtmpl': '%(title)s.%(ext)s',
    }
    with youtube_dl.YoutubeDL(ydl_opts) as ydl:
        try:
            info_dict = ydl.extract_info(url, download=True)
            video_title = info_dict.get('title', None)
            print(f"Downloaded '{video_title}' successfully!")
        except Exception as e:
            print("An error occurred during the download:")
            print(str(e))

video_url = 'https://www.youtube.com/watch?v=nWxB9yiYAgo'
download_youtube_video(video_url)

This returns:
ERROR: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the –verbose flag and include its complete output.

What am I missing here?

I tried changing the structure of the code a few times. Calling YouTube_dl with the link itself and nothing changes.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

youtube-dl is out of date. Since YouTube tends to change pretty often, YTDL must be kept up to date, otherwise errors like this crop up.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading