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

error in lld.py in line 12 #1

Open
wants to merge 51 commits into
base: master
Choose a base branch
from
Open

error in lld.py in line 12 #1

wants to merge 51 commits into from

Conversation

Pusendra
Copy link

Traceback (most recent call last):
File "lld.py", line 12, in
reload(sys)
NameError: name 'reload' is not defined

mclmza and others added 30 commits November 8, 2017 23:45
…a variable reference in one place.

- Regex pattern now allows for better file saving without as many errors as before on Windows file systems.
- replacement of invalid characters is now a space instead of nothing to help delineate words better
- Fixing typo in readme file.
Attempt to help fix errors within file paths on Windows with revised regex pattern, additional minor revisions
…r seems to works better.

- In the future you could consider something like this below:

invalid_file_chars =  re.compile(r'[^/]')

if os.name == "nt":
   invalid_file_chars = re.compile(r'[^\\/:*?"<>|]')
Subtitle Support, Release Date, Chapter & File numbering
Added Subtitle-Downloads, Release-Date and Chapter/Video-Numbering, German Umlaut
1. The course release date is now added to the course folder's name (because Lynda often updated the courses and you didn't know of what date your downloaded version was). In the future, we should differentiate between the release-date element and the update-date element (which's name I don't know yet) and use the newer one of both for the folder name.

2. I added subtitle support. That was a bit of a mess, but I tried my best, seems to be working. .srt files have to be the same name of the .mp4 files so a player like MPC HC will load it automatically.

3. I took over the chapter/video numbering from mclmza/linkedin-learning-downloader#3 (comment), so thanks for that!

4. Merged pull requests mclmza/linkedin-learning-downloader#36 and mclmza/linkedin-learning-downloader#33

5. Corrected bug: re.sub(invalid_file_chars, " ", string) is leading to an IO error when a video has an unallowed char at the end, e.g. out\What Is the Google Cloud Platform \ but Windows will remove space at the end of an folder, so the next download attempt will fail because there isn't such a path anymore. Strip() does the thing. Just saw that mclmza/linkedin-learning-downloader#33 also had that idea.

6. Replaced German Umlaut with their non-crictial equivalents
1. Added download for exercise files
2. Checking now for full course access
3. Now using configurable download path
4. Some code clean-up
Now catching the 'elements' error when trying to loop through an empty list because the request gave an 404 response caused by mostly user error when inserting a wrong course slug in the config file.
1. Easier adding of courses to the downloader. Just add them via LinkedIn (app or browser) to your bookmarks. Tool will now parse your LinkedIn bookmarks (https://www.linkedin.com/learning/me/saved).
The previously alternative of adding course slugs manually by pasting them into the config file is still there. The app will do a check for duplicates before automatically adding a course-slug to the list.
2. After successfully downloading a course, the course will be disabled in the config file (Download list) by putting a "#" in front of the course. If you want to check the files for integrity again, just the "#" and the next time when running the app it will check the enabled courses (if already).
Fixed Bug: Built a workaround for getting all bookmarks. LinkedIn is only providing 10 bookmarks at a time, so API has to be triggered 
(bookmarks/10) times
duracotton and others added 16 commits March 22, 2018 00:14
…ame old folders and files, use extractName to get alphabetic names. Backwards compatible with previous folder structure and naming convention. Allows to complete previous downloads (with old naming of folders and files) and change the naming of folder and files
…ame old folders and files, use extractName to get alphabetic names. Backwards compatible with previous folder structure and naming convention. Allows to complete previous downloads (with old naming of folders and files) and change the naming of folder and files. mclmza/linkedin-learning-downloader#40.
Various additions: subtitle & exercise downloads, file numbering, bookmark parsing etc
@circuitgeeks
Copy link

File "llcd.py", line 55
print '[] Obtained new session: %s' % session
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(print '[
] Obtained new session: %s' % session)?

I get this error Everytime

@SuperWizard7
Copy link

I'm getting an error:
Traceback (most recent call last):
File "lld.py", line 188, in ,
main()
File "lld.py", line 183, in main,
lld.get_logged_session()
File "lld.py", line 105, in get_logged_session
csrf = login_page.find(id='loginCsrfParam-login')['value']
TypeError: 'NoneType' object is not subscriptable

Please help.

@CuongVTC
Copy link

CuongVTC commented Jul 9, 2019

Please help me, this errors:
Traceback (most recent call last):
File "lld.py", line 187, in
main()
File "lld.py", line 182, in main
lld.get_logged_session()
File "lld.py", line 104, in get_logged_session
csrf = login_page.find(id='loginCsrfParam-login')['value']
TypeError: 'NoneType' object has no attribute 'getitem'

@zeroplus1994
Copy link

Traceback (most recent call last):
File "lld.py", line 12, in
reload(sys)
NameError: name 'reload' is not defined

I think it works only on up to Python 2.7 ! No support for Python 3.

sonnb and others added 4 commits August 3, 2019 09:27
A minor changes to make it works with the current LinkedIn form.
Added 1 second sleep between requests to server to prevent 429 response (Too many requests).
This should fix the download issue
@fastmarketo
Copy link

Line 50 is throwing an error:

image

@Jenishts
Copy link

Jenishts commented Oct 4, 2020

Line 50 is throwing an error:

image

You are geting this error becuase you are using python3 but this code it designed to run on python2. I think you have installed python2 and 3, so you will need to mentioned all the command as python2 and start if from the beginning

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

Successfully merging this pull request may close these issues.