[LinkedIn] An extractor error has occurred. (caused by KeyError('JSESSIONID')) #25669

Open
opened 2026-02-21 13:54:31 -05:00 by deekerman · 1 comment
Owner

Originally created by @chauhansarthakiitd on GitHub (Jan 12, 2023).

Checklist

  • I'm reporting a new site support request
  • 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 none of provided URLs violate any copyrights
  • I've searched the bugtracker for similar site support requests including closed ones

Description

https://www.linkedin.com/learning/python-essential-training-14898805/challenge-handling-arguments?autoplay=true&resume=false

I want to download LinkedIn Video Courses, But It Gives me This error:

>> youtube-dl 'https://www.linkedin.com/learning/python-essential-training-14898805/challenge-handling-arguments?autoplay=true&resume=false' --verbose
[debug] System config: []
[debug] User config: ['--buffer-size', '16384', '--external-downloader', 'aria2c', '--external-downloader-args', '--continue=true --file-allocation=prealloc --max-concurrent-downloads=24 --max-connection-per-server=16 --split=24 --min-split-size=1M', '--continue', '-f', 'bestvideo+bestaudio', '--merge-output-format', 'mkv', '--embed-subs', '--fixup', 'detect_or_warn', '--download-archive', 'C:\\Users\\nom4d\\AppData\\Roaming\\youtube-dl\\arch.txt', '--output', 'G:\\yt-dlp\\%(playlist)s\\%(playlist_index)s - %(title)s.%(ext)s', '--ignore-errors', '--no-overwrites', '--youtube-skip-dash-manifest']
[debug] Custom config: []
[debug] Command-line args: ['https://www.linkedin.com/learning/python-essential-training-14898805/challenge-handling-arguments?autoplay=true&resume=false', '--verbose']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.11.1 (CPython) - Windows-10-10.0.22621-SP0
[debug] exe versions: ffmpeg N-55702-g920046a, ffprobe N-55702-g920046a, phantomjs 2.1.1
[debug] Proxy map: {}
ERROR: An extractor error has occurred. (caused by KeyError('JSESSIONID')); 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 "C:\Program Files\Python311\Lib\site-packages\youtube_dl\extractor\common.py", line 534, in extract
    ie_result = self._real_extract(url)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\site-packages\youtube_dl\extractor\linkedin.py", line 95, in _real_extract
    video_data = self._call_api(
                 ^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\site-packages\youtube_dl\extractor\linkedin.py", line 36, in _call_api
    'Csrf-Token': self._get_cookies(api_url)['JSESSIONID'].value,
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
KeyError: 'JSESSIONID'
Traceback (most recent call last):
  File "C:\Program Files\Python311\Lib\site-packages\youtube_dl\extractor\common.py", line 534, in extract
    ie_result = self._real_extract(url)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\site-packages\youtube_dl\extractor\linkedin.py", line 95, in _real_extract
    video_data = self._call_api(
                 ^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\site-packages\youtube_dl\extractor\linkedin.py", line 36, in _call_api
    'Csrf-Token': self._get_cookies(api_url)['JSESSIONID'].value,
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
KeyError: 'JSESSIONID'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Python311\Lib\site-packages\youtube_dl\YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\site-packages\youtube_dl\YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
                ^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\site-packages\youtube_dl\extractor\common.py", line 547, in extract
    raise ExtractorError('An extractor error has occurred.', cause=e)
youtube_dl.utils.ExtractorError: An extractor error has occurred. (caused by KeyError('JSESSIONID')); 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.
Originally created by @chauhansarthakiitd on GitHub (Jan 12, 2023). ## Checklist - [ ] I'm reporting a new site support request - [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 none of provided URLs violate any copyrights - [x] I've searched the bugtracker for similar site support requests including closed ones ## Description https://www.linkedin.com/learning/python-essential-training-14898805/challenge-handling-arguments?autoplay=true&resume=false I want to download LinkedIn Video Courses, But It Gives me This error: ``` >> youtube-dl 'https://www.linkedin.com/learning/python-essential-training-14898805/challenge-handling-arguments?autoplay=true&resume=false' --verbose [debug] System config: [] [debug] User config: ['--buffer-size', '16384', '--external-downloader', 'aria2c', '--external-downloader-args', '--continue=true --file-allocation=prealloc --max-concurrent-downloads=24 --max-connection-per-server=16 --split=24 --min-split-size=1M', '--continue', '-f', 'bestvideo+bestaudio', '--merge-output-format', 'mkv', '--embed-subs', '--fixup', 'detect_or_warn', '--download-archive', 'C:\\Users\\nom4d\\AppData\\Roaming\\youtube-dl\\arch.txt', '--output', 'G:\\yt-dlp\\%(playlist)s\\%(playlist_index)s - %(title)s.%(ext)s', '--ignore-errors', '--no-overwrites', '--youtube-skip-dash-manifest'] [debug] Custom config: [] [debug] Command-line args: ['https://www.linkedin.com/learning/python-essential-training-14898805/challenge-handling-arguments?autoplay=true&resume=false', '--verbose'] [debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252 [debug] youtube-dl version 2021.12.17 [debug] Python version 3.11.1 (CPython) - Windows-10-10.0.22621-SP0 [debug] exe versions: ffmpeg N-55702-g920046a, ffprobe N-55702-g920046a, phantomjs 2.1.1 [debug] Proxy map: {} ERROR: An extractor error has occurred. (caused by KeyError('JSESSIONID')); 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 "C:\Program Files\Python311\Lib\site-packages\youtube_dl\extractor\common.py", line 534, in extract ie_result = self._real_extract(url) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\site-packages\youtube_dl\extractor\linkedin.py", line 95, in _real_extract video_data = self._call_api( ^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\site-packages\youtube_dl\extractor\linkedin.py", line 36, in _call_api 'Csrf-Token': self._get_cookies(api_url)['JSESSIONID'].value, ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ KeyError: 'JSESSIONID' Traceback (most recent call last): File "C:\Program Files\Python311\Lib\site-packages\youtube_dl\extractor\common.py", line 534, in extract ie_result = self._real_extract(url) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\site-packages\youtube_dl\extractor\linkedin.py", line 95, in _real_extract video_data = self._call_api( ^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\site-packages\youtube_dl\extractor\linkedin.py", line 36, in _call_api 'Csrf-Token': self._get_cookies(api_url)['JSESSIONID'].value, ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ KeyError: 'JSESSIONID' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Program Files\Python311\Lib\site-packages\youtube_dl\YoutubeDL.py", line 815, in wrapper return func(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\site-packages\youtube_dl\YoutubeDL.py", line 836, in __extract_info ie_result = ie.extract(url) ^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\site-packages\youtube_dl\extractor\common.py", line 547, in extract raise ExtractorError('An extractor error has occurred.', cause=e) youtube_dl.utils.ExtractorError: An extractor error has occurred. (caused by KeyError('JSESSIONID')); 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. ```
Author
Owner

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

Using the --verbose flag shows that LinkedIn is supported:

...
[linkedin:learning] challenge-handling-arguments: Downloading webpage
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.
...

Use --cookies ... with the site cookies from a logged-in browser session that can access the page content (otherwise the site shows "Unlock the full course today"), as described in the Manual.

The LinkedIn extractor ought to detect and report the not-logged-in status, as the yt-dlp LinkedIn extractor does.

@dirkf commented on GitHub (Jan 12, 2023): Using the `--verbose` flag shows that LinkedIn is supported: ``` ... [linkedin:learning] challenge-handling-arguments: Downloading webpage 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. ... ``` Use `--cookies ...` with the site cookies from a logged-in browser session that can access the page content (otherwise the site shows "Unlock the full course today"), as described in the Manual. The LinkedIn extractor ought to detect and report the not-logged-in status, as the yt-dlp LinkedIn extractor does.
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#25669
No description provided.