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.47k stars 10.05k forks source link

Linkeding learning broken #27004

Open thibautsergent opened 4 years ago

thibautsergent commented 4 years ago

Checklist

Verbose log

PS C:\yt> .\youtube-dl.exe --cookie .\cookies.txt --verbose https://www.linkedin.com/learning/l-essentiel-d-ansible/?autoplay=true
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--cookie', '.\\cookies.txt', '--verbose', 'https://www.linkedin.com/learning/l-essentiel-d-ansible/?autoplay=true']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2020.11.12
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: none
[debug] Proxy map: {}
[linkedin:learning:course] Downloading JSON metadata
[download] Downloading playlist: L'essentiel d'Ansible
[linkedin:learning:course] playlist L'essentiel d'Ansible: Collected 38 video ids (downloading 38 of them)
[download] Downloading video 1 of 38
[linkedin:learning] bienvenue-dans-l-essentiel-d-ansible: Downloading 360p JSON metadata
[linkedin:learning] bienvenue-dans-l-essentiel-d-ansible: Downloading 540p JSON metadata
[linkedin:learning] bienvenue-dans-l-essentiel-d-ansible: Downloading 720p JSON metadata
[linkedin:learning] bienvenue-dans-l-essentiel-d-ansible: Downloading m3u8 information
[debug] Default format spec: best/bestvideo+bestaudio
[debug] Invoking downloader on 'https://dms.licdn.com/playlist/C560DAQE0_QsXZsIIZQ/learning-original-video-vbr-720/0?e=1605643200&v=beta&t=99-7HKLJ_jYvbJRIFzfR8aDB8nLSy3bLwOdDu46oRdE#.mp4'
[download] Bienvenue dans « L'essentiel d'Ansible »-2301648.unknown_video has already been downloaded
[download] 100% of 7.39MiB
[download] Downloading video 2 of 38
[linkedin:learning] decouvrir-ansible: Downloading 360p JSON metadata
[linkedin:learning] decouvrir-ansible: Downloading 540p JSON metadata
[linkedin:learning] decouvrir-ansible: 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; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpwrmvn5tt\build\youtube_dl\YoutubeDL.py", line 797, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpwrmvn5tt\build\youtube_dl\extractor\common.py", line 532, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpwrmvn5tt\build\youtube_dl\extractor\linkedin.py", line 127, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpwrmvn5tt\build\youtube_dl\extractor\common.py", line 1359, in _sort_formats
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; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Description

Downloading recent courses isn't working. The first video of the playlist is downloaded but the others isn't.

For older courses, like the one in the source code is working :

PS C:\yt> .\youtube-dl.exe --cookie .\cookies.txt --verbose https://www.linkedin.com/learning/programming-foundations-fundamentals/?autoplay=true
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--cookie', '.\\cookies.txt', '--verbose', 'https://www.linkedin.com/learning/programming-foundations-fundamentals/?autoplay=true']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2020.11.12
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: none
[debug] Proxy map: {}
[linkedin:learning:course] Downloading JSON metadata
[download] Downloading playlist: Programming Foundations: Fundamentals (2011)
[linkedin:learning:course] playlist Programming Foundations: Fundamentals (2011): Collected 61 video ids (downloading 61 of them)
[download] Downloading video 1 of 61
[linkedin:learning] welcome: Downloading 360p JSON metadata
[linkedin:learning] welcome: Downloading 540p JSON metadata
[linkedin:learning] welcome: Downloading 720p JSON metadata
[linkedin:learning] welcome: Downloading m3u8 information
[debug] Default format spec: best/bestvideo+bestaudio
[debug] Invoking downloader on 'https://dms.licdn.com/playlist/C4E0DAQHLBc7O6tfCeQ/learning-original-video-vbr-720/0?e=1605643200&v=beta&t=2Trxsd_ksGuLMmgYH2gEiiic12RsASuNt7W0znNjvZw#.mp4'
[download] Welcome-90426.unknown_video has already been downloaded
[download] 100% of 22.30MiB
[download] Downloading video 2 of 61
[linkedin:learning] making-the-most-of-this-course: Downloading 360p JSON metadata
[linkedin:learning] making-the-most-of-this-course: Downloading 540p JSON metadata
[linkedin:learning] making-the-most-of-this-course: Downloading 720p JSON metadata
[linkedin:learning] making-the-most-of-this-course: Downloading m3u8 information
[debug] Default format spec: best/bestvideo+bestaudio
[debug] Invoking downloader on 'https://dms.licdn.com/playlist/C4E0DAQF0T0duvYBfvw/learning-original-video-vbr-720/0?e=1605643200&v=beta&t=RXyttYIrz3rIeNTKoG-ki9lfsxSgZ_pmaeYsL7ZNGoY#.mp4'
[download] Making the most of this course-90427.unknown_video has already been downloaded
[download] 100% of 17.69MiB
[download] Downloading video 3 of 61
[linkedin:learning] using-the-exercise-files: Downloading 360p JSON metadata
[linkedin:learning] using-the-exercise-files: Downloading 540p JSON metadata
[linkedin:learning] using-the-exercise-files: Downloading 720p JSON metadata
[linkedin:learning] using-the-exercise-files: Downloading m3u8 information
[debug] Default format spec: best/bestvideo+bestaudio
[debug] Invoking downloader on 'https://dms.licdn.com/playlist/C4D0DAQGbYHCqg4H1TQ/learning-original-video-vbr-720/0?e=1605643200&v=beta&t=zFs98V_FUkX5WMOAudYRIF8WG1VuMoqpG_wOLzZ48UY#.mp4'
[download] Using the exercise files-90428.unknown_video has already been downloaded
[download] 100% of 1.47MiB
[download] Downloading video 4 of 61
[linkedin:learning] what-is-programming: Downloading 360p JSON metadata
[linkedin:learning] what-is-programming: Downloading 540p JSON metadata
[linkedin:learning] what-is-programming: Downloading 720p JSON metadata
[linkedin:learning] what-is-programming: Downloading m3u8 information
[debug] Default format spec: best/bestvideo+bestaudio
[debug] Invoking downloader on 'https://dms.licdn.com/playlist/C4E0DAQHFHDhrbm6ELQ/learning-original-video-vbr-720/0?e=1605643200&v=beta&t=hnlThdnLcN597BU7PCUZcmaLY3z-w9bKdOhdmHe020k#.mp4'

*etc...*

ERROR: Interrupted by user

And for both case, the files downloaded successfully isn't properly named :

Bienvenue dans « L'essentiel d'Ansible »-2301648.unknown_video
Welcome-90426.unknown_video
Making the most of this course-90427.unknown_video
Using the exercise files-90428.unknown_video

Files ext should be " .mp4 " instead of " .unknown_video " (files are playable).

Thank you 👍

Telematica commented 4 years ago

Apparently is a problem either detecting or replacing the video extension. I successfully could download an entire course by doing this:

youtube-dl \ --username YOUR@MAIL.com --password PASSWORD \ -o '%(playlist_title)s/Lesson %(chapter_number)02d - %(chapter)s/%(playlist_index)s - %(title)s.%(ext)s.mp4' --verbose --add-metadata --write-sub --limit-rate 2M --min-sleep-interval 5 --max-sleep-interval 10 \ "https://www.linkedin.com/learning/learning-amazon-web-services-aws-for-developers-2/"

thibautsergent commented 4 years ago

@Telematica

It's solving the files extensions but downloading is still not working :

PS C:\yt> .\youtube-dl.exe --cookie .\cookies.txt -o '%(playlist_title)s/Lesson %(chapter_number)02d - %(chapter)s/%(playlist_index)s - %(title)s.%(ext)s.mp4' --verbose --add-metadata --write-sub --limit-rate 2M --min-sleep-interval 5 --max-sleep-interval 10 "https://www.linkedin.com/learning/l-essentiel-d-ansible/"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--cookie', '.\\cookies.txt', '-o', '%(playlist_title)s/Lesson %(chapter_number)02d - %(chapter)s/%(playlist_index)s - %(title)s.%(ext)s.mp4', '--verbose', '--add-metadata', '--write-sub', '--limit-rate', '2M', '--min-sleep-interval', '5', '--max-sleep-interval', '10', 'https://www.linkedin.com/learning/l-essentiel-d-ansible/']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2020.11.12
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: ffmpeg 2020-11-14-git-46e362b765-full_build-www.gyan.dev, ffprobe 2020-11-14-git-46e362b765-full_build-www.gyan.dev
[debug] Proxy map: {}
[linkedin:learning:course] Downloading JSON metadata
[download] Downloading playlist: L'essentiel d'Ansible
[linkedin:learning:course] playlist L'essentiel d'Ansible: Collected 38 video ids (downloading 38 of them)
[download] Downloading video 1 of 38
[linkedin:learning] bienvenue-dans-l-essentiel-d-ansible: Downloading 360p JSON metadata
[linkedin:learning] bienvenue-dans-l-essentiel-d-ansible: Downloading 540p JSON metadata
[linkedin:learning] bienvenue-dans-l-essentiel-d-ansible: Downloading 720p JSON metadata
[linkedin:learning] bienvenue-dans-l-essentiel-d-ansible: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'https://dms.licdn.com/playlist/C560DAQE0_QsXZsIIZQ/learning-original-video-vbr-720/0?e=1605780000&v=beta&t=Z4iidDiQNg18NG7_RDZmuZFaW6AM2zasPoYGGgYHgTo#.mp4'
[download] L'essentiel d'Ansible\Lesson 01 - Introduction\01 - Bienvenue dans « L'essentiel d'Ansible ».unknown_video.mp4 has already been downloaded
[download] 100% of 7.39MiB
[ffmpeg] Adding metadata to 'L'essentiel d'Ansible\Lesson 01 - Introduction\01 - Bienvenue dans « L'essentiel d'Ansible ».unknown_video.mp4'
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:L'essentiel d'Ansible\Lesson 01 - Introduction\01 - Bienvenue dans « L'essentiel d'Ansible ».unknown_video.mp4" -c copy -metadata "date=19700101" -metadata "title=Bienvenue dans « L'essentiel d'Ansible »" -metadata "purl=https://www.linkedin.com/learning/l-essentiel-d-ansible/bienvenue-dans-l-essentiel-d-ansible" "file:L'essentiel d'Ansible\Lesson 01 - Introduction\01 - Bienvenue dans « L'essentiel d'Ansible ».unknown_video.temp.mp4"
[download] Downloading video 2 of 38
[linkedin:learning] decouvrir-ansible: Downloading 360p JSON metadata
[linkedin:learning] decouvrir-ansible: Downloading 540p JSON metadata
[linkedin:learning] decouvrir-ansible: 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; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpwrmvn5tt\build\youtube_dl\YoutubeDL.py", line 797, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpwrmvn5tt\build\youtube_dl\extractor\common.py", line 532, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpwrmvn5tt\build\youtube_dl\extractor\linkedin.py", line 127, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpwrmvn5tt\build\youtube_dl\extractor\common.py", line 1359, in _sort_formats
thibautsergent commented 3 years ago

Maybe this can help, yt-dl is only able to download free video of courses and not the video tagged as subscribed.

Screenshot of json returned by https://www.linkedin.com/learning-api/courses{...} :

screenshot free-subscribed

simaremare commented 3 years ago

I hit the same problem even with subscriptions. I simply rename it to mp4. for /R %x in (*.unknown_video) do ren "%x" *.mp4