Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'url' when trying to download from youtube with [ext=mp4] #27803

Closed
5 tasks done
jmburges opened this issue Jan 13, 2021 · 1 comment
Closed
5 tasks done

KeyError: 'url' when trying to download from youtube with [ext=mp4] #27803

jmburges opened this issue Jan 13, 2021 · 1 comment

Comments

@jmburges
Copy link

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2021.01.08
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar issues including closed ones

Verbose log

youtube-dl --download-archive archive.txt --max-downloads 20 -f 'bestvideo[height<=1080]+bestvideo[ext=mp4]+bestaudio' -v --mark-watched https://www.youtube.com/watch\?v\=SqeFX9Xv6Jo

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--download-archive', 'archive.txt', '--max-downloads', '20', '-f', 'bestvideo[height<=1080]+bestvideo[ext=mp4]+bestaudio', '-v', '--mark-watched', 'https://www.youtube.com/watch?v=SqeFX9Xv6Jo']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.01.08
[debug] Python version 3.8.5 (CPython) - Linux-3.16.85-62-aarch64-with-glibc2.29
[debug] exe versions: ffmpeg 4.2.4, ffprobe 4.2.4
[debug] Proxy map: {}
[youtube] SqeFX9Xv6Jo: Downloading webpage
[debug] Invoking downloader on 'https://r2---sn-8xgp1vo-xfgl.googlevideo.com/videoplayback?expire=1610573074&ei=shD_X9mbHofghgapmbnoCg&ip=108.6.22.232&id=o-AEdvkOx-GAcNpRjANv46Nu6Fmnsu7s8NjMMk1TgxdWSv&itag=137&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C271%2C278%2C313%2C394%2C395%2C396%2C397%2C398%2C399%2C400%2C401&source=youtube&requiressl=yes&mh=o_&mm=31%2C29&mn=sn-8xgp1vo-xfgl%2Csn-ab5l6n6e&ms=au%2Crdu&mv=m&mvi=2&pl=16&initcwndbps=1528750&vprv=1&mime=video%2Fmp4&ns=Hh1pQHq7ci8btaWHnRhs6DAF&gir=yes&clen=82034251&dur=462.958&lmt=1601909345763417&mt=1610551234&fvip=2&keepalive=yes&c=WEB&txp=5532432&n=a9QzkyeXl0jEMf&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIhAKcz1uiVAIRc2PeIUIx2E-BOUE5YeCShkcqwReTFAUjHAiBr1EwfOj8MlWR1wHWb4IHrSm3o2i2j9YZBC6ZDHWiwOg%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAJFTGeKAgxsZwrbohlDrvDNaXZzWvHh2X29L2aYsPBzbAiEAueFvhX2QS59jE-MBDV1w04y_kP_0QaE4_7nQSRdSfos%3D&ratebypass=yes'
[download] How Pimp My Ride actually started Car Trek-SqeFX9Xv6Jo.f137.mp4 has already been downloaded
[download] 100% of 78.23MiB
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/youtube_dl/__init__.py", line 474, in main
    _real_main(argv)
  File "/usr/local/lib/python3.8/dist-packages/youtube_dl/__init__.py", line 464, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/local/lib/python3.8/dist-packages/youtube_dl/YoutubeDL.py", line 2028, in download
    res = self.extract_info(
  File "/usr/local/lib/python3.8/dist-packages/youtube_dl/YoutubeDL.py", line 796, in extract_info
    return self.__extract_info(url, ie, download, extra_info, process)
  File "/usr/local/lib/python3.8/dist-packages/youtube_dl/YoutubeDL.py", line 803, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/youtube_dl/YoutubeDL.py", line 835, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/local/lib/python3.8/dist-packages/youtube_dl/YoutubeDL.py", line 869, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/usr/local/lib/python3.8/dist-packages/youtube_dl/YoutubeDL.py", line 1654, in process_video_result
    self.process_info(new_info)
  File "/usr/local/lib/python3.8/dist-packages/youtube_dl/YoutubeDL.py", line 1930, in process_info
    partial_success = dl(fname, new_info)
  File "/usr/local/lib/python3.8/dist-packages/youtube_dl/YoutubeDL.py", line 1870, in dl
    fd = get_suitable_downloader(info, self.params)(self, self.params)
  File "/usr/local/lib/python3.8/dist-packages/youtube_dl/downloader/__init__.py", line 34, in get_suitable_downloader
    protocol = determine_protocol(info_dict)
  File "/usr/local/lib/python3.8/dist-packages/youtube_dl/utils.py", line 4290, in determine_protocol
    url = info_dict['url']
KeyError: 'url'

Description

Trying to download the mp4 version of a youtube playlist. When I do it with the mp4 flag, it gives me this error. If I remove the [ext=mp4] everything works!

@dstftw
Copy link
Collaborator

dstftw commented Jan 13, 2021

Invalid format selection expression: there must be only one + operator.

@dstftw dstftw closed this as completed in d81a213 Jan 13, 2021
ThirumalaiK pushed a commit to ThirumalaiK/youtube-dl that referenced this issue Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants