Coder Social home page Coder Social logo

linkedin-learning-downloader's Introduction

LinkedIn Learning Downloader

Asynchronous scraping tool to fetch LinkedIn-learning's courses videos.

Dependencies:

  • Python 3.6
  • aiohttp
  • lxml

Info

Please use this script for your own purposes.

This script was written for educational usage only.

Make sure your LinkedIn account is NOT protected with 2FA

Usage

pip install -r requirements.txt

Copy and edit config.py.example (username, password, and courses slugs)

e.g:
COURSE URL: https://www.linkedin.com/learning/python-advanced-design-pattern
->
SLUG: python-advanced-design-pattern

python linkedin_learning.py

TODO

  • Add Subtitles
  • Add Description
  • Use argparser
  • Fetch courses from bookmarks

linkedin-learning-downloader's People

Contributors

jaaufauvre avatar liranbg avatar theghostofc avatar umair13adil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

linkedin-learning-downloader's Issues

Error When Downloading a Video that not have Subtitles

The Error occurs when i try to download this bootstrap-4-essential-training and the download stops, sorry for my bad english btw

Traceback (most recent call last): File "linkedin_learning.py", line 230, in <module> loop.run_until_complete(process()) File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete return future.result() File "linkedin_learning.py", line 218, in process await fetch_courses() File "linkedin_learning.py", line 102, in fetch_courses return await asyncio.gather(*map(fetch_course, COURSES)) File "linkedin_learning.py", line 116, in fetch_course await fetch_chapters(course) File "linkedin_learning.py", line 128, in fetch_chapters await asyncio.gather(*chain.from_iterable(fetch_chapter(course, chapter) for chapter in course.chapters)) File "linkedin_learning.py", line 139, in fetch_video_or_wait await fetch_video(course, chapter, video) File "linkedin_learning.py", line 166, in fetch_video subtitles = data['elements'][0]['selectedVideo']['transcript'] # transcript is empty when no subtitles available KeyError: 'transcript'

EDIT: When i commented these lines everything worked fine

Screenshot_2019-08-31_07-56-56

SSO Support

Highly doubt this will/can be implemented, but the only way I have access to Linkedin Learning is via the company I work for. So in order for me to log in, I have to use SSO (single sign-on). That means I can't define a password. Any help would be appreciated!

KeyError: 'elements'

pl note the following error:

Traceback (most recent call last):
File "linkedin_learning.py", line 226, in
loop.run_until_complete(process())
File "C:\ProgramData\Anaconda3\lib\asyncio\base_events.py", line 467, in run_until_complete
return future.result()
File "linkedin_learning.py", line 214, in process
await fetch_courses()
File "linkedin_learning.py", line 102, in fetch_courses
return await asyncio.gather(*map(fetch_course, COURSES))
File "linkedin_learning.py", line 112, in fetch_course
course = build_course(data['elements'][0])
KeyError: 'elements'

I can not download any course

image
C:\link\linkedin>python linkedin_learning.py
2019-05-25 02:52:00,888 asyncio DEBUG Using selector: SelectSelector
2019-05-25 02:52:00,891 root INFO [*] -------------Login------------

2019-05-25 02:52:00,892 root INFO [*] Login step 1 - Getting CSRF to
ken...
Traceback (most recent call last):
File "linkedin_learning.py", line 226, in
loop.run_until_complete(process())
File "C:\Users\Server\AppData\Local\Programs\Python\Python36\lib\asyncio\base_
events.py", line 466, in run_until_complete
return future.result()
File "linkedin_learning.py", line 210, in process
await login(USERNAME, PASSWORD)
File "linkedin_learning.py", line 82, in login
csrf = html.xpath("//input[@id='loginCsrfParam-login']/@value").pop()
IndexError: pop from empty list

this is the error, do you know how to solve it?

Csfr

000157-select c__python27_python exe

I don't know what happens but I got that screen then it suddenly the python shutdown and nothing happen !! anyone knows how to proceed with the downloading ?!

Received error 429 from server

Hello @liranbg ,

When I download 2 or 3 Time learning path always got an error

for URI https://lor1-app33648.prod.linkedin.com:7220/learning-api/learningApiInit

Is this normal?Because after that my LinkedIn Learning will down 1 day, in next day I will up again

Regards,
Alfa Irawan

SyntaxError line 35

Hi there, super sorry but when I run the script I see the following error...

line 35 return f'{hours:02}:{minutes:02}:{seconds:02},{milliseconds:02}' ^ SyntaxError: invalid syntax

I know nothing about Python sorry, is that easy for me to fix?

Access denied

Hi,

What's the reason why I get 'Access to is DENIED' in command prompt? A couple days ago everything was working fine.

Somebody an idea

D:\Process\LinkedIn>python linkedin_learning.py
2018-11-17 15:47:32,281 asyncio DEBUG Using selector: SelectSelector
2018-11-17 15:47:32,311 root INFO [] -------------Login-------------
2018-11-17 15:47:32,312 root INFO [
] Login step 1 - Getting CSRF token...
2018-11-17 15:47:32,774 root DEBUG [] CSRF: 497f9701-76f4-42d7-8314-78993b5e6e83
2018-11-17 15:47:32,774 root INFO [
] Login step 1 - Done
2018-11-17 15:47:32,775 root INFO [] Login step 2 - Logging In...
2018-11-17 15:47:33,664 root INFO [
] Login step 2 - Done
2018-11-17 15:47:33,665 root INFO [] -------------Done-------------
2018-11-17 15:47:33,665 root INFO [
] -------------Fetching Course-------------
2018-11-17 15:47:34,348 asyncio ERROR Unclosed connection
client_connection: Connection<ConnectionKey(host='www.linkedin.com', port=443, is_ssl=True, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=-1125722543)>
2018-11-17 15:47:34,351 root INFO [] Access to Making Sense of the CSS Box Model is DENIED
2018-11-17 15:47:34,352 root INFO [
] -------------Done-------------

How to skip the files that are already downloaded

Please give me code to add in download file function so it checks if filename already exists, and if it does skips to the next file. From midway into downloading it gave me error that connection has been forcibly closed by remote host. When I ran it again it started from beginning downloading each video again

Thanks for the work you have done. I appreciate it a lot.

Problem

Mac-Pro:linkedin-learning-downloader-master username$ python linkedin_learning.py
File "linkedin_learning.py", line 35
return f'{hours:02}:{minutes:02}:{seconds:02},{milliseconds:02}'
^
SyntaxError: invalid syntax

What can i do?
Thanks.

Can you Please Move This project to Gitlab

I do not feel comfortable to report bugs here as linkedin learning is also a microsoft product like github. Can you please move this project to gitlab.

Being said that -

$ python3 linkedin_learning.py
2020-02-23 11:27:19,997 asyncio      DEBUG    Using selector: EpollSelector
2020-02-23 11:27:19,998 root         INFO     [*] -------------Login-------------
2020-02-23 11:27:19,998 root         INFO     [*] Login step 1 - Getting CSRF token...
2020-02-23 11:27:20,539 root         DEBUG    [*] CSRF: 3522bda6-54d6-41b8-8114-3e2052afee5e
2020-02-23 11:27:20,539 root         INFO     [*] Login step 1 - Done
2020-02-23 11:27:20,539 root         INFO     [*] Login step 2 - Logging In...
2020-02-23 11:27:21,272 root         INFO     [*] Login step 2 - Done
2020-02-23 11:27:21,274 root         INFO     [*] -------------Done-------------
2020-02-23 11:27:21,274 root         INFO     [*] -------------Fetching Course-------------
2020-02-23 11:27:22,172 asyncio      ERROR    Unclosed connection
client_connection: Connection<ConnectionKey(host='www.linkedin.com', port=443, is_ssl=True, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=-3461783210526392284)>
2020-02-23 11:27:22,172 root         INFO     [*] Fetching course Discovering Your Strengths
2020-02-23 11:27:22,174 root         INFO     [~] Fetching course 'Discovering Your Strengths' Chapter no. 7 Video no. 3
2020-02-23 11:27:22,174 root         INFO     [~] Fetching course 'Discovering Your Strengths' Chapter no. 2 Video no. 1
2020-02-23 11:27:22,174 root         INFO     [~] Fetching course 'Discovering Your Strengths' Chapter no. 7 Video no. 4
2020-02-23 11:27:22,175 root         INFO     [~] Fetching course 'Discovering Your Strengths' Chapter no. 1 Video no. 1
2020-02-23 11:27:22,175 root         INFO     [~] Fetching course 'Discovering Your Strengths' Chapter no. 8 Video no. 1
2020-02-23 11:27:22,176 root         INFO     [~] Fetching course 'Discovering Your Strengths' Chapter no. 1 Video no. 2
2020-02-23 11:27:22,176 root         INFO     [~] Fetching course 'Discovering Your Strengths' Chapter no. 3 Video no. 1
2020-02-23 11:27:22,177 root         INFO     [~] Fetching course 'Discovering Your Strengths' Chapter no. 2 Video no. 2
2020-02-23 11:27:22,177 root         INFO     [~] Fetching course 'Discovering Your Strengths' Chapter no. 3 Video no. 2
2020-02-23 11:27:22,177 root         INFO     [~] Fetching course 'Discovering Your Strengths' Chapter no. 3 Video no. 3
2020-02-23 11:27:23,027 root         INFO     [~] Writing 01 - Find career success and perform at your best.mp4
2020-02-23 11:27:23,041 root         INFO     [~] Fetching course 'Discovering Your Strengths' Chapter no. 4 Video no. 1
2020-02-23 11:27:23,048 root         INFO     [~] Writing 02 - What are strengths.mp4
2020-02-23 11:27:23,057 root         INFO     [~] Fetching course 'Discovering Your Strengths' Chapter no. 4 Video no. 2
Traceback (most recent call last):
  File "linkedin_learning.py", line 234, in <module>
    loop.run_until_complete(process())
  File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete
    return future.result()
  File "linkedin_learning.py", line 222, in process
    await fetch_courses()
  File "linkedin_learning.py", line 102, in fetch_courses
    return await asyncio.gather(*map(fetch_course, COURSES))
  File "linkedin_learning.py", line 116, in fetch_course
    await fetch_chapters(course)
  File "linkedin_learning.py", line 128, in fetch_chapters
    await asyncio.gather(*chain.from_iterable(fetch_chapter(course, chapter) for chapter in course.chapters))
  File "linkedin_learning.py", line 139, in fetch_video_or_wait
    await fetch_video(course, chapter, video)
  File "linkedin_learning.py", line 165, in fetch_video
    video_url = data['elements'][0]['selectedVideo']['url']['progressiveUrl']
KeyError: 'url'

It only create directories without files.

fail in login

Hi, I just got an error when running the linkedin_learning.py even though the two-step verification is turned off at my end. Could you point out why this error occurs and how to fix it? Thanks!

Error message: KeyError: 'transcript'

While running the script on one of the latest courses the below error message shows.

Traceback (most recent call last):
File "linkedin_learning.py", line 226, in
loop.run_until_complete(process())
File "C:\Program Files\Python36\lib\asyncio\base_events.py", line 466, in run_until_complete
return future.result()
File "linkedin_learning.py", line 214, in process
await fetch_courses()
File "linkedin_learning.py", line 102, in fetch_courses
return await asyncio.gather(*map(fetch_course, COURSES))
File "linkedin_learning.py", line 119, in fetch_course
await fetch_chapters(course)
File "linkedin_learning.py", line 131, in fetch_chapters
await asyncio.gather(*chain.from_iterable(fetch_chapter(course, chapter) for chapter in course.chapters))
File "linkedin_learning.py", line 166, in fetch_video
subtitles = data['elements'][0]['selectedVideo']['transcript']['lines']
KeyError: 'transcript'

Problem is that the course has no transcripts, yet.

Implementation of detection and skipping of transcripts if none detected would be great.

aiohttp error

osx 10.13.16
I have this error :
Traceback (most recent call last):
File "linkedin_learning.py", line 2, in
import aiohttp
ModuleNotFoundError: No module named 'aiohttp'

but when a tried to reinstall the requirements, i have this :
Requirement already satisfied: async-timeout<4.0,>=3.0 in /usr/local/lib/python3.7/site-packages (from aiohttp->-r requirements.txt (line 1)) (3.0.1)

can someone please help ?
thanks in advance

Access to Learning Regular Expressions is DENIED

2019-05-09 04:15:17,441 asyncio DEBUG Using selector: SelectSelector
2019-05-09 04:15:17,488 root INFO [] -------------Login-------------
2019-05-09 04:15:17,504 root INFO [
] Login step 1 - Getting CSRF token...
2019-05-09 04:15:18,801 root DEBUG [] CSRF: b7f173a9-7db8-41f8-8685-417ee463787d
2019-05-09 04:15:18,801 root INFO [
] Login step 1 - Done
2019-05-09 04:15:18,802 root INFO [] Login step 2 - Logging In...
2019-05-09 04:15:19,926 root INFO [
] Login step 2 - Done
2019-05-09 04:15:19,926 root INFO [] -------------Done-------------
2019-05-09 04:15:19,926 root INFO [
] -------------Fetching Course-------------
2019-05-09 04:15:21,332 asyncio ERROR Unclosed connection
client_connection: Connection<ConnectionKey(host='www.linkedin.com', port=443, is_ssl=True, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=-2113838121280623005)>
2019-05-09 04:15:21,332 root INFO [] Access to Learning Regular Expressions is DENIED
2019-05-09 04:15:21,332 root INFO [
] -------------Done-------------

Download failure

Hi @liranbg, thank you for coding :)

How can I get over this problem?

Traceback (most recent call last):
  File ".\linkedin_learning.py", line 283, in <module> loop.run_until_complete(process())
  File "C:\***\AppData\Local\Programs\Python\Python37-32\lib\asyncio\base_events.py", line 579, in run_until_complete return future.result()
  File ".\linkedin_learning.py", line 271, in process await fetch_courses()
  File ".\linkedin_learning.py", line 119, in fetch_courses return await asyncio.gather(*map(fetch_course, COURSES))
  File ".\linkedin_learning.py", line 128, in fetch_course    data = await resp.json()
  File "C:\***\AppData\Local\Programs\Python\Python37-32\lib\site-packages\aiohttp\client_reqrep.py", line 1031, in json headers=self.headers) 
    aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: ', 
    url=URL('https://www.linkedin.com/learning-api/detailedCourses??fields=fullCourseUnlocked,releasedOn,exerciseFileUrls,exerciseFiles&addParagraphsToTranscript=true&courseSlug=***&q=slugs')

RuntimeError: [!] Could not login. Please check your credentials CAPTCHA!

Traceback (most recent call last):
File "linkedin_learning.py", line 225, in
loop.run_until_complete(process())
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 579, in run_until_complete
return future.result()
File "linkedin_learning.py", line 209, in process
await login(USERNAME, PASSWORD)
File "linkedin_learning.py", line 95, in login
raise RuntimeError("[!] Could not login. Please check your credentials")
RuntimeError: [!] Could not login. Please check your credentials

Getting Access to <training> is denied after successful login.

Initially, could not get past Login Step 1.

Traceback (most recent call last):
File "linkedin_learning.py", line 227, in
loop.run_until_complete(process())
File "C:\Users\test\Python\Python37\lib\asyncio\base_events.py", line 584, in run_until_complete
return future.result()
File "linkedin_learning.py", line 211, in process
await login(USERNAME, PASSWORD)
File "linkedin_learning.py", line 83, in login
csrf = html.xpath("//input[@id='loginCsrfParam-login']/@value").pop()
IndexError: pop from empty list

But, when I'm able to proceed further, I still see Access to is denied.
When I try another set of videos, I get back to the "pop from empty list" error again.

Any ideas ? I added another line to look at the line for "html" - so, the line numbers from the original src are 226, 210 and 82.

api links returning 404 again.

An example link returning 404:
'https://www.linkedin.com/learning-api/detailedCourses??fields=fullCourseUnlocked,releasedOn,exerciseFileUrls,exerciseFiles&addParagraphsToTranscript=true&courseSlug=grasshopper-rhino-python-scripting&q=slugs'

Also, it might be useful to catch this exception and return a useful error about what's wrong with the url:

Exception has occurred: KeyError
'elements'
  File "E:\downloads\linkedin-learning-downloader-master\linkedin-learning-downloader-master\linkedin_learning.py", line 112, in fetch_course
    course = build_course(data['elements'][0])

syntax error

C:\Users\Dragoon\Downloads\Compressed\linkedin-learning-downloader-master>python linkedin_learning.py
Traceback (most recent call last):
File "linkedin_learning.py", line 12, in
from config import USERNAME, PASSWORD, COURSES, PROXY, BASE_DOWNLOAD_PATH
File "C:\Users\Dragoon\Downloads\Compressed\linkedin-learning-downloader-master\config.py", line 8
COURSES = https://www.linkedin.com/learning/introducing-the-pmbok-guide-seventh-edition
^
SyntaxError: invalid syntax

Lynda.exe unable to download all courses

The exe file is unable to download the full video in a course, like it can download a video in chapter 1, maybe 2videos in chpt 2 and it continues like that until it got to the end of the course. at the end between a bulk video of about 33 it may only download 12 videos
, pls admin help on this.

Error running

When running the python linkedin_learning.py i get the errors :
2020-05-06 13:09:02,102 asyncio DEBUG Using proactor: IocpProactor
2020-05-06 13:09:02,107 root INFO [] -------------Login-------------
2020-05-06 13:09:02,108 root INFO [
] Login step 1 - Getting CSRF token...
Traceback (most recent call last):
File "linkedin_learning.py", line 234, in
loop.run_until_complete(process())
File "C:\Python38\lib\asyncio\base_events.py", line 616, in run_until_complete
return future.result()
File "linkedin_learning.py", line 218, in process
await login(USERNAME, PASSWORD)
File "linkedin_learning.py", line 82, in login
csrf = html.xpath("//input[@name='loginCsrfParam']/@value").pop()
IndexError: pop from empty list

I am not using a proxy

SOME VIDEOS ARE SKIPPED FROM DOWNLOAD

Hi i am beginner. I am facing a problem while testing this wonderful script. One course downloaded perfectly. However, another course did not download complete as some of the videos were skipped. I tried three times but some of the videos were skipped.
I doubt it is because of quiz included in the course that videos are skipped. Please check and guide after taking a look at photos attached.
Thanks
01Capture
1Capture
0Capture
2Capture
3Capture
4Capture
5Capture
6Capture

Downloads video files partially

While downloading the videos of a course. I get an incomple mp4 file for videos that are somewhat bigger than 5mb. The shorter videochapters of the course are downloaded completelly, while the longer ones become blank halfway the video duration.

When i run the lld.py script:

  • logging in succeeds
  • creating all folders succeeds
  • starting to download all the files (Fetching Chapers...) succeeds
  • but only a few chapters (the shorter ones) are done fetching before a bunch of errors occur.

I get the following output:

2019-03-28 23:52:44,632 root INFO [-] Done fetching course 'Coursename' Chapter no. 6 Video no. 11

The mp4 of Chapter no. 6 Video no. 11 is complete. After a few good downloads, the following errors start to come:

2019-03-28 23:53:44,135 root ERROR [!] Error while downloading: ''
Traceback (most recent call last):
File "lld.py", line 197, in download_file
chunk = await r.content.read(1024)
File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\aiohttp\streams.py", line 369, in read
await self._wait('read')
File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\aiohttp\streams.py", line 297, in _wait
await waiter
File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\aiohttp\helpers.py", line 585, in exit
raise asyncio.TimeoutError from None
concurrent.futures._base.TimeoutError
2019-03-28 23:53:44,146 root INFO [-] Done fetching course 'Coursename' Chapter no. 3 Video no. 12

The mp4 of Chapter no. 3 Video no. 12 is incomplete. Lots of similar errors follow for the rest of the files.

Any suggestions how to properly fetch these videos?

Linkedin changed course API?!

Hi, it sounds like linkedin changed its API for fetching video information, This error happening after run script:

Traceback (most recent call last):
  File "linkedin_learning.py", line 263, in <module>
    loop.run_until_complete(process())
  File "C:\Python\Python38-32\lib\asyncio\base_events.py", line 608, in run_until_complete
    return future.result()
  File "linkedin_learning.py", line 251, in process
    await fetch_courses()
  File "linkedin_learning.py", line 112, in fetch_courses
    return await asyncio.gather(*map(fetch_course, COURSES))
  File "linkedin_learning.py", line 127, in fetch_course
    await fetch_chapters(course)
  File "linkedin_learning.py", line 153, in fetch_chapters
    await asyncio.gather(*chain.from_iterable(fetch_chapter(course, chapter) for chapter in course.chapters))
  File "linkedin_learning.py", line 164, in fetch_video_or_wait
    await fetch_video(course, chapter, video)
  File "linkedin_learning.py", line 192, in fetch_video
    video_url = data['elements'][0]['selectedVideo']['url']['progressiveUrl']
KeyError: 'url'

Can anyone please fix it?

Not Working

I have installed latest version of python 3.8.5 on Windows.

python linkedin_learning.py after this command nothing is happening.

key error "Elements

I am getting this error,
File "linkedin_learning.py", line 222, in process
await fetch_courses()
File "linkedin_learning.py", line 102, in fetch_courses
return await asyncio.gather(*map(fetch_course, COURSES))
File "linkedin_learning.py", line 112, in fetch_course
course = build_course(data['elements'][0])
KeyError: 'elements'

Could not login, Please check your credentials

Traceback (most recent call last):
File "linkedin_learning.py", line 226, in
loop.run_until_complete(process())
File "/anaconda3/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
return future.result()
File "linkedin_learning.py", line 210, in process
await login(USERNAME, PASSWORD)
File "linkedin_learning.py", line 95, in login
raise RuntimeError("[!] Could not login. Please check your credentials")
RuntimeError: [!] Could not login. Please check your credentials

asyncio ERROR Unclosed connection

2018-11-27 13:10:51,121 asyncio ERROR Unclosed connection

client_connection: Connection<ConnectionKey(host='www.linkedin.com', port=443, is_ssl=True, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=-182393375643722223)>

2018-11-27 13:10:51,124 root INFO [*] Access to Learning Java Enterprise Edition is DENIED

KeyError: 'url' - But then sometimes you run again and it works?

I am getting an issue where sometimes it downloads and other times it doesn't.

If it doesn't work, it then sometimes work if I run it again later.

The error I get is:

Traceback (most recent call last):
File "g:\Google Drive\Documents\Code\Python\Linkedin Video Downloader 3.6\linkedin_learning.py", line 226, in
loop.run_until_complete(process())
File "C:\Users\me\AppData\Local\Programs\Python\Python37-32\lib\asyncio\base_events.py", line 568, in run_until_complete
return future.result()
File "g:\Google Drive\Documents\Code\Python\Linkedin Video Downloader 3.6\linkedin_learning.py", line 214, in process
await fetch_courses()
File "g:\Google Drive\Documents\Code\Python\Linkedin Video Downloader 3.6\linkedin_learning.py", line 102, in fetch_courses
return await asyncio.gather(*map(fetch_course, COURSES))
File "g:\Google Drive\Documents\Code\Python\Linkedin Video Downloader 3.6\linkedin_learning.py", line 119, in fetch_course
await fetch_chapters(course)
File "g:\Google Drive\Documents\Code\Python\Linkedin Video Downloader 3.6\linkedin_learning.py", line 131, in fetch_chapters
await asyncio.gather(*chain.from_iterable(fetch_chapter(course, chapter) for chapter in course.chapters))
File "g:\Google Drive\Documents\Code\Python\Linkedin Video Downloader 3.6\linkedin_learning.py", line 165, in fetch_video
video_url = data['elements'][0]['selectedVideo']['url']['progressiveUrl']
KeyError: 'url'

IndexError: pop from empty list

<Element html at 0x147f197a728>
Traceback (most recent call last):
  File "c:/Users/cvargasa/Documents/IMG/Scrapy/linkedin-learning-downloader/linkedin_learning.py", line 227, in <module>
    loop.run_until_complete(process())
  File "C:\Users\cvargasa\AppData\Local\conda\conda\envs\cnn - copia\lib\asyncio\base_events.py", line 468, in run_until_complete
    return future.result()
  File "c:/Users/cvargasa/Documents/IMG/Scrapy/linkedin-learning-downloader/linkedin_learning.py", line 211, in process
    await login(USERNAME, PASSWORD)
  File "c:/Users/cvargasa/Documents/IMG/Scrapy/linkedin-learning-downloader/linkedin_learning.py", line 83, in login
    csrf = html.xpath("//input[@id='loginCsrfParam-login']/@value").pop()
IndexError: pop from empty list

Access is denied by CAPTCHA on Linkedin account

Hi, can't download any course anymore because Linkedin set a CAPTCHA on my account. Hope this will not be forever. Beware of not downloading to many courses in short time or Linkedin will track it and take action. Able to log in normally on Linkedin Learning in my browser after passing the captcha.

Does anyone have the same problem?

Traceback (most recent call last):
File "linkedin_learning.py", line 225, in
loop.run_until_complete(process())
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 573, in run_until_complete
return future.result()
File "linkedin_learning.py", line 209, in process
await login(USERNAME, PASSWORD)
File "linkedin_learning.py", line 95, in login
raise RuntimeError("[!] Could not login. Please check your credentials")
RuntimeError: [!] Could not login. Please check your credentials

KeyError: 'transcript'

Hey, getting these errors, while fetching 'netzwerkanalyse-mit-kali-linux':

Traceback (most recent call last):
File "linkedin_learning.py", line 226, in
loop.run_until_complete(process())
File "/usr/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
return future.result()
File "linkedin_learning.py", line 214, in process
await fetch_courses()
File "linkedin_learning.py", line 102, in fetch_courses
return await asyncio.gather(*map(fetch_course, COURSES))
File "linkedin_learning.py", line 119, in fetch_course
await fetch_chapters(course)
File "linkedin_learning.py", line 131, in fetch_chapters
await asyncio.gather(*chain.from_iterable(fetch_chapter(course, chapter) for chapter in course.chapters))
File "linkedin_learning.py", line 166, in fetch_video
subtitles = data['elements'][0]['selectedVideo']['transcript']['lines']
KeyError: 'transcript'

Maybe you can have a look into it? Working fine with other courses.

'installing-and-setting-up-gns3' gives the same error:

Traceback (most recent call last):
File "linkedin_learning.py", line 226, in
loop.run_until_complete(process())
File "/usr/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
return future.result()
File "linkedin_learning.py", line 214, in process
await fetch_courses()
File "linkedin_learning.py", line 102, in fetch_courses
return await asyncio.gather(*map(fetch_course, COURSES))
File "linkedin_learning.py", line 119, in fetch_course
await fetch_chapters(course)
File "linkedin_learning.py", line 131, in fetch_chapters
await asyncio.gather(*chain.from_iterable(fetch_chapter(course, chapter) for chapter in course.chapters))
File "linkedin_learning.py", line 166, in fetch_video
subtitles = data['elements'][0]['selectedVideo']['transcript']['lines']
KeyError: 'transcript'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.