Ahmed-Soli / linkedin-course-downloader

python script for downloading courses from linkedin learning
51 stars 26 forks source link

Connection error due to security Google reCAPTCHA during login phase #8

Closed MagicRico closed 4 years ago

MagicRico commented 4 years ago

Hi everyone, yesterday, I downloaded a lot of mini courses and now it is impossible to download due to a connection error. This script always login and logout between each new download, now it shows connection error. So I checked why it didn't achieve to connect anymore and saw LinkedIn set me a Google reCAPTCHA during my login phase. Would be great if the script could avoid login/logout or should be able to bypass in case of reCAPTCHA. Now I don't know how long I will have this reCAPTCHA.

2020-06-07 15:48:13,710 root INFO [] -------------Login------------- 2020-06-07 15:48:13,710 root INFO [] Login step 1 - Getting CSRF token... 2020-06-07 15:48:13,960 root INFO [] Login step 1 - Done 2020-06-07 15:48:13,960 root INFO [] Login step 2 - Logging In... 2020-06-07 15:48:14,575 root ERROR Connection Error: [!] Could not login. Please check your credentials

Ahmed-Soli commented 4 years ago

The reCAPTCHA is inevitable if you are downloading too many courses . The reCAPTCHA acts as an anti scraping mechanism and it only appears when you over use the api ( There is an API daily limit ) if you exceed the limit , a temp block from using the api will be applied to your account ( will be lifted with 24-48 hours ) as for the constant login ( I'm working on a new feature to save the session and restore it )

Ahmed-Soli commented 4 years ago

@MagicRico you can pull the latest commit where I added the session saving and restoring Mechanism .