Skip to content
This repository has been archived by the owner on Dec 30, 2021. It is now read-only.

Error downloading course #88

Open
fjdogar opened this issue Feb 3, 2021 · 1 comment
Open

Error downloading course #88

fjdogar opened this issue Feb 3, 2021 · 1 comment

Comments

@fjdogar
Copy link

fjdogar commented Feb 3, 2021

i am trying to download a course using organization login and i get the following error

[*] : Trying to login as organization (calgarylibrary.ca)...
[+] : Logged in successfully.
Traceback (most recent call last):on ..
File "C:\lyndadl\lynda-dl.py", line 395, in
main()
File "C:\lyndadl\lynda-dl.py", line 391, in main
lynda.course_download(path=options.output, quality=options.quality)
File "C:\lyndadl\lynda-dl.py", line 162, in course_download
course = lynda.course(url=self.url, username=self.username, password=self.password, organization=self.organization, cookies=self.cookies)
File "C:\lyndadl\lynda_lynda.py", line 38, in course
return Lynda(url, username, password, organization, cookies, basic, callback)
File "C:\lyndadl\lynda_internal.py", line 43, in init
super(InternLyndaCourse, self).init(*args, **kwargs)
File "C:\lyndadl\lynda_shared.py", line 65, in init
self._fetch_course()
File "C:\lyndadl\lynda_internal.py", line 55, in _fetch_course
self._info = self._real_extract(self._url)
File "C:\lyndadl\lynda_extract.py", line 257, in _real_extract
_lynda['assets'] = self._extract_assets(course_id)
File "C:\lyndadl\lynda_extract.py", line 157, in _extract_assets
entry.update(self._extract_asset_download_url(url='https://www.lynda.com/ajax/{href}'.format(href=entry.get('download_url'))))
File "C:\lyndadl\lynda_extract.py", line 138, in _extract_asset_download_url
return {'type' : 'file', 'file_size' : int(response.headers.get('Content-Length')), 'download_url' : response.url, 'extension' : response.headers.get('Content-Type').split('/')[-1]}
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

@imzza
Copy link

imzza commented Feb 16, 2021

I am getting the sane issue and this issues only happen for the courses that have multiple exercise file links like 10 20 or more.

raceback (most recent call last):on .. File "D:\webserver\PythonPractice\lynda\lyndadl.py", line 244, in <module> pat = os.path.join('some', 'test', 'sample') File "D:\webserver\PythonPractice\lynda\lyndadl.py", line 238, in main lynda.course_download(path=output, quality=quality) File "D:\webserver\PythonPractice\lynda\lyndadl.py", line 162, in course_download course = lynda.course(url=self.url, username=self.username, password=self.password, organization=self.organization, cookies=self.cookies) File "D:\webserver\PythonPractice\lynda\lynda\_lynda.py", line 16, in course return Lynda(url, username, password, organization, cookies, basic, callback) File "D:\webserver\PythonPractice\lynda\lynda\_internal.py", line 21, in __init__ super(InternLyndaCourse, self).__init__(*args, **kwargs) File "D:\webserver\PythonPractice\lynda\lynda\_shared.py", line 44, in __init__ self._fetch_course() File "D:\webserver\PythonPractice\lynda\lynda\_internal.py", line 33, in _fetch_course self._info = self._real_extract(self._url) File "D:\webserver\PythonPractice\lynda\lynda\_extract.py", line 235, in _real_extract _lynda['assets'] = self._extract_assets(course_id) File "D:\webserver\PythonPractice\lynda\lynda\_extract.py", line 135, in _extract_assets entry.update(self._extract_asset_download_url(url='https://www.lynda.com/ajax/{href}'.format(href=entry.get('download_url')))) File "D:\webserver\PythonPractice\lynda\lynda\_extract.py", line 116, in _extract_asset_download_url return {'type' : 'file', 'file_size' : int(response.headers.get('Content-Length')), 'download_url' : response.url, 'extension' : response.headers.get('Content-Type').split('/')[-1]} TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants