ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.58k stars 10.05k forks source link

LinkedIn Learning - Error: requested format not available #29703

Open VisalVa opened 3 years ago

VisalVa commented 3 years ago

Dear Team,

When I tried this command:

youtube-dl -o "{my_local_pc_path}/%(playlist)s/%(chapter_number)s - %(chapter)s/%(playlist_index)s - %(title)s.%(ext)s" -f "bestvideo[height<=960,ext=mp4]+bestaudio[height<=960,ext=mp4]" --ignore-config --write-description --write-info-json --write-annotations --write-thumbnail --verbose --no-mtime --no-check-certificate --cookies "{my_local_pc_path}/cookies.txt" "https://www.linkedin.com/learning/critical-thinking-and-problem-solving/"

to download an entire course from LinkedIn Learning site (e.g. https://www.linkedin.com/learning/critical-thinking-and-problem-solving/, I got the below error:

`debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8 [debug] youtube-dl version 2021.06.06 [debug] Python version 3.9.6 (CPython) - macOS-10.16-x86_64-i386-64bit [debug] exe versions: none [debug] Proxy map: {} [linkedin:learning:course] Downloading JSON metadata [download] Downloading playlist: Critical Thinking and Problem Solving [linkedin:learning:course] playlist Critical Thinking and Problem Solving: Collected 17 video ids (downloading 17 of them) [download] Downloading video 1 of 17 [linkedin:learning] improve-your-problem-solving-skills: Downloading 360p JSON metadata [linkedin:learning] improve-your-problem-solving-skills: Downloading 540p JSON metadata [linkedin:learning] improve-your-problem-solving-skills: Downloading 720p JSON metadata [linkedin:learning] improve-your-problem-solving-skills: Downloading m3u8 information

ERROR: requested format not available Traceback (most recent call last): File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 815, in wrapper return func(self, *args, **kwargs) File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1076, in __process_iterable_entry return self.process_ie_result( File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 918, in process_ie_result return self.process_ie_result( File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 881, in process_ie_result return self.process_video_result(ie_result, download=download) File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1683, in process_video_result raise ExtractorError('requested format not available', youtube_dl.utils.ExtractorError: requested format not available`

Any idea what went wrong here? Or Am I missing something?

Thanks.

ghost commented 3 years ago

Use -F to see first which formats are available.

And this format specification bestaudio[height<=960,ext=mp4] looks odd. Audio doesn't have height, and ext may be m4a.

VisalVa commented 3 years ago

I tried with -F option, I seemed to be able to see only the first video but I got the same error with the 2nd video.

[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8 [debug] youtube-dl version 2021.06.06 [debug] Python version 3.9.6 (CPython) - macOS-11.5.1-x86_64-i386-64bit [debug] exe versions: none [debug] Proxy map: {} [linkedin:learning:course] Downloading JSON metadata [download] Downloading playlist: Critical Thinking and Problem Solving [linkedin:learning:course] playlist Critical Thinking and Problem Solving: Collected 17 video ids (downloading 17 of them) [download] Downloading video 1 of 17 [linkedin:learning] improve-your-problem-solving-skills: Downloading 360p JSON metadata [linkedin:learning] improve-your-problem-solving-skills: Downloading 540p JSON metadata [linkedin:learning] improve-your-problem-solving-skills: Downloading 720p JSON metadata [linkedin:learning] improve-your-problem-solving-skills: Downloading m3u8 information [info] Available formats for 2420886: format code extension resolution note audio m4a audio only audio@ 64k hls-234 mp4 416x234 234k , avc1.42001e, mp4a.40.2 hls-313 mp4 416x234 313k , avc1.42001e, mp4a.40.2 hls-566 mp4 640x360 566k , avc1.42001e, mp4a.40.2 hls-661 mp4 640x360 661k , avc1.42001e, mp4a.40.2 progressive-360p unknown_video 640x360
hls-843 mp4 960x540 843k , avc1.42001e, mp4a.40.2 hls-1525 mp4 960x540 1525k , avc1.42001e, mp4a.40.2 progressive-540p unknown_video 960x540
hls-2139 mp4 1280x720 2139k , avc1.42001e, mp4a.40.2 progressive-720p unknown_video 1280x720 (best) [download] Downloading video 2 of 17 [linkedin:learning] know-yourself: Downloading 360p JSON metadata [linkedin:learning] know-yourself: Downloading 540p JSON metadata [linkedin:learning] know-yourself: Downloading 720p JSON metadata ERROR: No video formats found; 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. Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper return func(self, *args, **kwargs) File "/usr/local/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 836, in __extract_info ie_result = ie.extract(url) File "/usr/local/lib/python3.9/site-packages/youtube_dl/extractor/common.py", line 534, in extract ie_result = self._real_extract(url) File "/usr/local/lib/python3.9/site-packages/youtube_dl/extractor/linkedin.py", line 127, in _real_extract self._sort_formats(formats, ('width', 'height', 'source_preference', 'tbr', 'abr')) File "/usr/local/lib/python3.9/site-packages/youtube_dl/extractor/common.py", line 1376, in _sort_formats raise ExtractorError('No video formats found') youtube_dl.utils.ExtractorError: No video formats found; 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.

ghost commented 3 years ago

Be sure to call youtube-dl with the --verbose flag and include its complete output.

Your log is not complete. Do not edit.

VisalVa commented 3 years ago

@kikuyan, I did include "--verbose" in my command.

youtube-dl -F -ciw --no-mtime --no-check-certificate --verbose --cookies "cookies.txt" "https://www.linkedin.com/learning/critical-thinking-and-problem-solving/" -o "/output/%(playlist)s/%(chapter_number)s - %(chapter)s/%(playlist_index)s - %(title)s.%(ext)s" --write-sub

Am I missing something here?