LinkedIn supports only videos from linkedinLearning, but not from posts #25694

Open
opened 2026-02-21 13:55:12 -05:00 by deekerman · 7 comments
Owner

Originally created by @mumaguma on GitHub (Jan 27, 2023).

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2021.12.17
  • 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 ** found ##27270 but it was for older version**

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '-f', 'best', 'https://www.linkedin.com/video/event/urn:li:ugcPost:7021048319078457345/', '--cookies', 'cookies_linkedin.txt']
[debug] Encodings: locale cp1250, fs mbcs, out cp852, pref cp1250
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: ffmpeg 2021-07-04-git-301d275301-full_build-www.gyan.dev, ffprobe 2021-07-04-git-301d275301-full_build-www.gyan.dev
[debug] Proxy map: {}
[generic] urn:li:ugcPost:7021048319078457345: Requesting header
WARNING: Falling back on generic information extractor.
[generic] urn:li:ugcPost:7021048319078457345: Downloading webpage
[generic] urn:li:ugcPost:7021048319078457345: Extracting information
ERROR: Unsupported URL: https://www.linkedin.com/video/event/urn:li:ugcPost:7021048319078457345/
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpupik7c6w\build\youtube_dl\YoutubeDL.py", line 815, in wrapper
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpupik7c6w\build\youtube_dl\YoutubeDL.py", line 836, in __extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpupik7c6w\build\youtube_dl\extractor\common.py", line 534, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpupik7c6w\build\youtube_dl\extractor\generic.py", line 3489, in _real_extract
youtube_dl.utils.UnsupportedError: Unsupported URL: https://www.linkedin.com/video/event/urn:li:ugcPost:7021048319078457345/

Description

It seems that Linkedin extractor supports only urls with "urn:li:lyndaCourse:", whereas videos in user/channel posts have "urn:li:ugcPost:" and are not recognised by youtube-dl.

Originally created by @mumaguma on GitHub (Jan 27, 2023). <!-- ###################################################################### WARNING! IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE ###################################################################### --> ## Checklist <!-- Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl: - First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.12.17. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED. - Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser. - Make sure that all URLs and arguments with special characters are properly quoted or escaped as explained in http://yt-dl.org/escape. - Search the bugtracker for similar issues: http://yt-dl.org/search-issues. DO NOT post duplicates. - Finally, put x into all relevant boxes (like this [x]) --> - [x] I'm reporting a broken site support - [x] I've verified that I'm running youtube-dl version **2021.12.17** - [x] I've checked that all provided URLs are alive and playable in a browser - [x] I've checked that all URLs and arguments with special characters are properly quoted or escaped - [x] I've searched the bugtracker for similar issues including closed ones ** found ##27270 but it was for older version** ## Verbose log <!-- Provide the complete verbose output of youtube-dl that clearly demonstrates the problem. Add the `-v` flag to your command line you run youtube-dl with (`youtube-dl -v <your command line>`), copy the WHOLE output and insert it below. It should look similar to this: [debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj'] [debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251 [debug] youtube-dl version 2021.12.17 [debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2 [debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4 [debug] Proxy map: {} <more lines> --> ```shellsession [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['-v', '-f', 'best', 'https://www.linkedin.com/video/event/urn:li:ugcPost:7021048319078457345/', '--cookies', 'cookies_linkedin.txt'] [debug] Encodings: locale cp1250, fs mbcs, out cp852, pref cp1250 [debug] youtube-dl version 2021.12.17 [debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041 [debug] exe versions: ffmpeg 2021-07-04-git-301d275301-full_build-www.gyan.dev, ffprobe 2021-07-04-git-301d275301-full_build-www.gyan.dev [debug] Proxy map: {} [generic] urn:li:ugcPost:7021048319078457345: Requesting header WARNING: Falling back on generic information extractor. [generic] urn:li:ugcPost:7021048319078457345: Downloading webpage [generic] urn:li:ugcPost:7021048319078457345: Extracting information ERROR: Unsupported URL: https://www.linkedin.com/video/event/urn:li:ugcPost:7021048319078457345/ Traceback (most recent call last): File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpupik7c6w\build\youtube_dl\YoutubeDL.py", line 815, in wrapper File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpupik7c6w\build\youtube_dl\YoutubeDL.py", line 836, in __extract_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpupik7c6w\build\youtube_dl\extractor\common.py", line 534, in extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpupik7c6w\build\youtube_dl\extractor\generic.py", line 3489, in _real_extract youtube_dl.utils.UnsupportedError: Unsupported URL: https://www.linkedin.com/video/event/urn:li:ugcPost:7021048319078457345/ ``` ## Description <!-- Provide an explanation of your issue in an arbitrary form. Provide any additional information, suggested solution and as much context and examples as possible. If work on your issue requires account credentials please provide them or explain how one can obtain them. --> It seems that Linkedin extractor supports only urls with "urn:li:lyndaCourse:", whereas videos in user/channel posts have "urn:li:ugcPost:" and are not recognised by youtube-dl.
Author
Owner

@dirkf commented on GitHub (Jan 27, 2023):

The problem page needs an account.

The yt-dlp LinkedIn extractor module has an extractor that works for /posts/... LinkedIn URLs (which needs to be back-ported).

Perhaps the problem page has the same structure. You can check this by searching the page source for an element like `<video ... data-sources="..." ...>. If that's present, we can just adjust the URL pattern in the back-port.

There should also be a check for redirecting to the sign-up page, which means you needed to log in.

@dirkf commented on GitHub (Jan 27, 2023): The problem page needs an account. The yt-dlp LinkedIn extractor module has an extractor that works for `/posts/...` LinkedIn URLs (which needs to be back-ported). Perhaps the problem page has the same structure. You can check this by searching the page source for an element like `<video ... data-sources="..." ...>. If that's present, we can just adjust the URL pattern in the back-port. There should also be a check for redirecting to the sign-up page, which means you needed to log in.
Author
Owner

@dirkf commented on GitHub (Jan 28, 2023):

Also this URL format https://www.linkedin.com/feed/update/urn:li:activity:7016901149999955968 has the same page structure as /posts/....

@dirkf commented on GitHub (Jan 28, 2023): Also this [URL format](https://github.com/yt-dlp/yt-dlp/issues/6104) https://www.linkedin.com/feed/update/urn:li:activity:7016901149999955968 has the same page structure as `/posts/...`.
Author
Owner

@mumaguma commented on GitHub (Jan 29, 2023):

The problem page needs an account.
it there any way I could help? (excluding sharing my account / cookies.txt)

@mumaguma commented on GitHub (Jan 29, 2023): > The problem page needs an account. it there any way I could help? (excluding sharing my account / cookies.txt)
Author
Owner

@dirkf commented on GitHub (Jan 29, 2023):

This:

... searching the page source for an element like `<video ... data-sources="..." ...>.

@dirkf commented on GitHub (Jan 29, 2023): This: >... searching the page source for an element like `<video ... data-sources="..." ...>.
Author
Owner

@mumaguma commented on GitHub (Jan 29, 2023):

I cannot find any "data-sources" occurrence. The only "<video" tag was:
<video class="vjs-tech" id="vjs_video_3_html5_api" tabindex="-1" preload="metadata" poster="https://media.licdn.com/dms/image/C5624AQG3F3uWI9x3UQ/feedshare-live-thumbnail_high/0/1674752424731?e=1675652400&amp;v=beta&amp;t=q49vx7KlH8eeyZGizpIYwquG2bl-E09RDjBjThPYu6o" src="blob:https://www.linkedin.com/72705d44-517b-4e86-a4fb-0e0ee8b5b45d" autoplay="autoplay"></video>

@mumaguma commented on GitHub (Jan 29, 2023): I cannot find any "data-sources" occurrence. The only "<video" tag was: ```<video class="vjs-tech" id="vjs_video_3_html5_api" tabindex="-1" preload="metadata" poster="https://media.licdn.com/dms/image/C5624AQG3F3uWI9x3UQ/feedshare-live-thumbnail_high/0/1674752424731?e=1675652400&amp;v=beta&amp;t=q49vx7KlH8eeyZGizpIYwquG2bl-E09RDjBjThPYu6o" src="blob:https://www.linkedin.com/72705d44-517b-4e86-a4fb-0e0ee8b5b45d" autoplay="autoplay"></video>```
Author
Owner

@Udhayarajan commented on GitHub (Feb 22, 2023):

https://github.com/Udhayarajan/VidSnapKit-Ultimate/blob/master/src/commonMain/kotlin/com/mugames/vidsnapkit/extractor/LinkedIn.kt

I have wrote code to download LinkedIn post downloader.

Also explore my cloud Services at https://rapidapi.com/mudhayarajan2013/api/vidsnap

@Udhayarajan commented on GitHub (Feb 22, 2023): https://github.com/Udhayarajan/VidSnapKit-Ultimate/blob/master/src/commonMain/kotlin/com/mugames/vidsnapkit/extractor/LinkedIn.kt I have wrote code to download LinkedIn post downloader. Also explore my cloud Services at https://rapidapi.com/mudhayarajan2013/api/vidsnap
Author
Owner

@From2750 commented on GitHub (Oct 1, 2024):

https://github.com/Udhayarajan/VidSnapKit-Ultimate/blob/master/src/commonMain/kotlin/com/mugames/vidsnapkit/extractor/LinkedIn.kt

I have wrote code to download LinkedIn post downloader.

Also explore my cloud Services at https://rapidapi.com/mudhayarajan2013/api/vidsnap

How do I use the script?

@From2750 commented on GitHub (Oct 1, 2024): > https://github.com/Udhayarajan/VidSnapKit-Ultimate/blob/master/src/commonMain/kotlin/com/mugames/vidsnapkit/extractor/LinkedIn.kt > > I have wrote code to download LinkedIn post downloader. > > Also explore my cloud Services at https://rapidapi.com/mudhayarajan2013/api/vidsnap How do I use the script?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#25694
No description provided.