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

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

Open
5 tasks done
mumaguma opened this issue Jan 27, 2023 · 6 comments
Open
5 tasks done
Labels
account-needed site-support-request Add extractor(s) for a new domain yt-dlp working or fix available in yt-dlp

Comments

@mumaguma
Copy link

mumaguma commented 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 #Linkedin "posts" link result in ERROR: Unsupported URL #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.

@dirkf
Copy link
Contributor

dirkf commented 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 dirkf added broken-IE problem with existing site extraction account-needed site-support-request Add extractor(s) for a new domain yt-dlp working or fix available in yt-dlp and removed broken-IE problem with existing site extraction labels Jan 27, 2023
@dirkf
Copy link
Contributor

dirkf commented Jan 28, 2023

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

@mumaguma
Copy link
Author

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

@dirkf
Copy link
Contributor

dirkf commented Jan 30, 2023

This:

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

@mumaguma
Copy link
Author

mumaguma commented Jan 30, 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>

@Udhayarajan
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
account-needed site-support-request Add extractor(s) for a new domain yt-dlp working or fix available in yt-dlp
Projects
None yet
Development

No branches or pull requests

3 participants