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

Unable to download Linkedin Learning videos with cookies #18820

Closed
rocxteady opened this issue Jan 11, 2019 · 6 comments
Closed

Unable to download Linkedin Learning videos with cookies #18820

rocxteady opened this issue Jan 11, 2019 · 6 comments

Comments

@rocxteady
Copy link

@rocxteady rocxteady commented Jan 11, 2019

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2019.01.10. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2019.01.10

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

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 here. It should look similar to one below (replace it with your log inserted between triple ```):

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'--cookies', u'cookies.txt', u'-o', u'%(playlist_index)02d - %(title)s.%(ext)s', u'https://www.linkedin.com/learning/ios-app-development-design-patterns-for-mobile-architecture']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.01.10
[debug] Python version 2.7.10 (CPython) - Darwin-18.2.0-x86_64-i386-64bit
[debug] exe versions: none
[debug] Proxy map: {'http': 'http://127.0.0.1:8888', 'https': 'http://127.0.0.1:8888'}
ERROR: An extractor error has occurred. (caused by KeyError(u'JSESSIONID',)); 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 "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 508, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/linkedin.py", line 154, in _real_extract
    course_data = self._call_api(course_slug, 'chapters,description,title')
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/linkedin.py", line 34, in _call_api
    'Csrf-Token': self._get_cookies(api_url)['JSESSIONID'].value,
KeyError: u'JSESSIONID'
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 793, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 521, in extract
    raise ExtractorError('An extractor error has occurred.', cause=e)
ExtractorError: An extractor error has occurred. (caused by KeyError(u'JSESSIONID',)); 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 of your issue, suggested solution and other information

I'm trying to download Linkedin Learning videos with "--cookies" option. But it gave me the error about "JSESSIONID". I'm using the cookies.txt Chrome extension to export the cookies. I can download the videos with user and password option but I don't want to login so often.

Thank you.

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Jan 11, 2019

Invalid cookie file, it should contain at least the JSESSIONID and li_at cookie.

youtube-dl --cookies ~/Downloads/cookies.txt https://www.linkedin.com/learning/ios-app-development-design-patterns-for-mobile-architecture
[linkedin:learning:course] Downloading JSON metadata
[download] Downloading playlist: iOS App Development: Design Patterns for Mobile Architecture
[linkedin:learning:course] playlist iOS App Development: Design Patterns for Mobile Architecture: Collected 29 video ids (downloading 29 of them)
[download] Downloading video 1 of 29
[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
[download] Destination: Welcome-630948.mp4
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 57 4283k   57 2447k    0     0   478k      0  0:00:08  0:00:05  0:00:03  493k
@remitamine remitamine closed this Jan 11, 2019
@rocxteady
Copy link
Author

@rocxteady rocxteady commented Jan 11, 2019

How did you export your cookies? My cookie file have JSESSIONID and li_at.

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Jan 11, 2019

with cookies.txt extension on Firefox, and removing the #HttpOnly_ prefix for the cookies needed.

@rocxteady
Copy link
Author

@rocxteady rocxteady commented Jan 13, 2019

I didn't understand the part removing #HttpOnly_ prefix for the cookies. Can you explain?

@rocxteady
Copy link
Author

@rocxteady rocxteady commented Jan 13, 2019

I uninstalled firefox and installed again some how it worked. Thank you.

@vesnikos
Copy link

@vesnikos vesnikos commented Mar 7, 2019

youtube-dl --cookies ~/Downloads/cookies.txt https://www.linkedin.com/learning/ios-app-development-design-patterns-for-mobile-architecture -v

I can only download up to the 5th video in the series, after that it gives me an error :

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--cookies', './cookies.txt', 'https://www.linkedin.com/learning/ios-app-development-design-patterns-for-mobile-architecture', '-v']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2019.03.01
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17763
[debug] exe versions: none
[debug] Proxy map: {}
...
[download] Downloading video 5 of 29
[linkedin:learning] architecture-pieces: Downloading 360p JSON metadata
[linkedin:learning] architecture-pieces: Downloading 540p JSON metadata
[linkedin:learning] architecture-pieces: 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\rg3\tmplyslo9xs\build\youtube_dl\YoutubeDL.py", line 794, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmplyslo9xs\build\youtube_dl\extractor\common.py", line 508, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmplyslo9xs\build\youtube_dl\extractor\linkedin.py", line 126, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmplyslo9xs\build\youtube_dl\extractor\common.py", line 1305, 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.
@ytdl-org ytdl-org deleted a comment from sinanduman May 2, 2019
@ytdl-org ytdl-org locked and limited conversation to collaborators May 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.