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

Lynda extract body error #9768

Closed
cristina28 opened this issue Jun 13, 2016 · 7 comments
Closed

Lynda extract body error #9768

cristina28 opened this issue Jun 13, 2016 · 7 comments

Comments

@cristina28
Copy link

@cristina28 cristina28 commented Jun 13, 2016

Hi,

I met this issue when trying to download from lynda.com:
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'-u', u'PRIVATE', u'-p', u'PRIVATE', u'http://www.lynda.com/C-tutorials/Why-smart-pointers/379655/419905-4.html']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.06.12
[debug] Python version 2.6.6 - Linux-2.6.32-573.el6.x86_64-x86_64-with-centos-6.7-Final
[debug] exe versions: none
[debug] Proxy map: {'https': 'https://HIDDEN:911'}
[lynda] Downloading signin page
[lynda] Submitting email
ERROR: An extractor error has occurred. (caused by KeyError(u'body',)); 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 "./youtube-dl/youtube_dl/extractor/common.py", line 341, in extract
self.initialize()
File "./youtube-dl/youtube_dl/extractor/common.py", line 335, in initialize
self._real_initialize()
File "./youtube-dl/youtube_dl/extractor/lynda.py", line 26, in _real_initialize
self._login()
File "./youtube-dl/youtube_dl/extractor/lynda.py", line 88, in _login
password_form = signin_page['body']
KeyError: u'body'
Traceback (most recent call last):
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 676, in extract_info
ie_result = ie.extract(url)
File "./youtube-dl/youtube_dl/extractor/common.py", line 348, in extract
raise ExtractorError('An extractor error has occurred.', cause=e)
ExtractorError: An extractor error has occurred. (caused by KeyError(u'body',)); 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.

The proxy is ok, I just hidden it.
Thank you,
Cristina

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 13, 2016

Post the output of youtube-dl -u user -p pass --dump-pages http://www.lynda.com/C-tutorials/Why-smart-pointers/379655/419905-4.html.

@cristina28
Copy link
Author

@cristina28 cristina28 commented Jun 13, 2016

Hi,

I gave up to user & password solution and I tried it by using netrc authentication. It worked fine first time and I got to download a video from lynda but beginning with the second time I received the "Session expired" error. I've read about this and there are some solutions but in that cases they use cookies.
In my .netrc file I used: machine lynda:course login USER password PASSWORD. I tried also with machine=lynda but it doesn't work. It seems that the extractor has to be lynda:course. I don't know what is the idea, I just tried with both.
I put here the output:
./youtube-dl --netrc --dump-pages http://www.lynda.com/C-tutorials/Comparison-relational-operators/182674/366595-4.html
WARNING: parsing .netrc: No authenticators for lynda (None, line None)
[lynda] 366595: Downloading video JSON
[lynda] Dumping request to http://www.lynda.com/ajax/player?videoId=366595&type=video
eyJTdGF0dXMiOiJFeHBpcmVkU2Vzc2lvbiIsIk1lc3NhZ2UiOiJTZXNzaW9uIGhhcyBleHBpcmVkIn0=
ERROR: lynda returned error: Session has expired

Thank you,
Cristina

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 13, 2016

That is completely different error than one in OP post. Extractor in .netrc must be lynda.

@cristina28
Copy link
Author

@cristina28 cristina28 commented Jun 13, 2016

But with lynda:course it worked first time, it really downloaded the video. I don't know what to do with the expired session error.
Regarding the first error I have a huge output, I don't know how to send, I put a short version here:
./youtube-dl --dump-pages -u USER@DOM.COM -p PSW http://www.lynda.com/C-tutorials/Comparison-relational-operators/182674/366595-4.html
[lynda] Downloading signin page
[lynda] Dumping request to https://www.lynda.com/signin
PCFET0NUWVBFIGh0bWw+DQo8aHRtbCBsYW5nPSJlbi1VU.... [a lot of characters]
[lynda] Submitting email
[lynda] Dumping request to https://www.lynda.com/signin/password
eyJSZWRpcmVjdFVybCI6Imh0dHBzOi8vc2hpYi5seW5kYS5jb20vU2hpYmJvbGV0aC5zc28vSW5Db21tb24/cHJvdmlkZXJJZD1zZXBtcFx1MDAyNnRhcmdldD1odHRwczovL3NoaWIubHluZGEuY29tL0luQ29tbW9uIn0=
ERROR: An extractor error has occurred. (caused by KeyError(u'body',)); 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.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 13, 2016

Looks like authentication involves some additional redirect in your case. What are your credentials personal or organization? Can you provide your credentials for test?

@cristina28
Copy link
Author

@cristina28 cristina28 commented Jun 13, 2016

Organization. I'm afraid I'm not allowed. I could try different others tests and come back with the results.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 13, 2016

Organization login is not supported.

@dstftw dstftw closed this Jun 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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