Giter VIP home page Giter VIP logo

linkedin-learning-video-downloader's Introduction

LinkedIn Learning Video Downloader | Teenenggr.com

Based on mclmza's linkedin-learning-downloader Edited by Jatin Patel

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

Edit config.py file (username, password, collections and courses slugs)

e.g:
COURSE URL: https://www.linkedin.com/learning/learning-autodesk-inventor/creating-a-base-extrusion
->
SLUG: learning-autodesk-inventor
e.g:
COLLECTION URL: https://www.linkedin.com/learning/collections/6686199457681301504
->
ID: 6686199457681301504

python3 linkedin_learning.py

############################################################################################

linkedin-learning-video-downloader's People

Contributors

dennybrandes avatar j3patel 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

linkedin-learning-video-downloader's Issues

Issue with downloading locked videos in Linkdin

I am able to download videos but in folders only free or preview files downloading with data. remaining files with zero kb mean there is no video for locked videos in Linkdin.

Bro, Can you help me with this?

Config_file:

import os

USERNAME = '[email protected]'
PASSWORD = 'XXXXX'
COURSES = [
'data-science-foundations-data-mining-in-python'
]

COLLECTIONS = [

]

BASE_DOWNLOAD_PATH = os.path.join(os.path.dirname(file), "downloads")
USE_PROXY = False
PROXY = "http://127.0.0.1:8888" if USE_PROXY else None

JFYI

I didn't subscribe to that respective course.

Login doesn't work anymore

It is impossible to log in with correct credentials now. It seems they have changed something on Linkedin Learning. All Linkedin Learning downloaders have this trouble now, except those which use cookie authorization
pic

Connect to Host files3

Connection Error: Cannot connect to host files3.lynda.com:443 ssl:False [nodename nor servname provided, or not known]

Videos scraped, but no content (unplayable)

The console logs the information correctly, but when I view each of the files, I only get the first folder right (meaning, I get to play the file AND the subtitle file). The rest of the files are no more than 100kb in size and not playable. Also, the script seems to be scraping the subtitle file of the first video only, the rest of the videos have no subtitle file included.

cannot create video or subtitle files 67 character long names

When writing a file if the name of the vid or sub is longer than 67 characters it will fail to create it and exit.

proposed solution: add a rule that cuts the name of the file at 66 characters in order to create it.

EDIT: observed with slug microsoft-azure-security-technologies-az-500-cert-prep-2-implement-platform-protection-2 chapter 2 video 7. Name of file: 07 - Configure a firewall on a storage account, Azure SQL, KeyVault, or App Service

No Such File or Directory Error in Some Courses.

Your script is working perfect :).
Thanks for this awesome script.
But in some courses, it shows No such File or Directory Error.
The script downloads some videos of that course but failed to download all.
Here the SLUG of those courses.
#'ai-the-linkedin-way-a-conversation-with-deepak-agarwal',
#'artificial-intelligence-for-project-managers',
#'learning-xai-explainable-artificial-intelligence'

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

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

Access to Excel Essential Training (Office 365/Microsoft 365) is DENIED

2021-06-30 01:37:09,736 root INFO [] Login step 1 - Getting CSRF token...
2021-06-30 01:37:10,340 root DEBUG [
] CSRF: becdad3a-5bd2-417d-8951-ef35686cfb9e
2021-06-30 01:37:10,341 root INFO [] Login step 1 - Done
2021-06-30 01:37:10,344 root INFO [
] Login step 2 - Logging In...
2021-06-30 01:37:10,975 root INFO [] Login step 2 - Done
2021-06-30 01:37:10,975 root INFO [
] -------------Done-------------
2021-06-30 01:37:10,978 root INFO [] -------------Fetching Course-------------
2021-06-30 01:37:13,758 root INFO [
] Access to Excel Essential Training (Office 365/Microsoft 365) is DENIED
2021-06-30 01:37:13,762 root INFO [] Fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 1 Video no. 1
2021-06-30 01:37:13,764 root INFO [
] Fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 2 Video no. 1
2021-06-30 01:37:13,771 root INFO [] Fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 2 Video no. 2
2021-06-30 01:37:13,772 root INFO [
] Fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 2 Video no. 5
2021-06-30 01:37:13,774 root INFO [] Fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 3 Video no. 1
2021-06-30 01:37:13,778 root INFO [
] Fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 3 Video no. 2
2021-06-30 01:37:13,780 root INFO [] Fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 3 Video no. 4
2021-06-30 01:37:13,785 root INFO [
] Fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 4 Video no. 1
2021-06-30 01:37:13,788 root INFO [] Fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 4 Video no. 2
2021-06-30 01:37:13,789 root INFO [
] Fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 4 Video no. 4
2021-06-30 01:37:13,791 root INFO [] Fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 5 Video no. 2
2021-06-30 01:37:13,792 root INFO [
] Fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 5 Video no. 3
2021-06-30 01:37:13,795 root INFO [] Fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 6 Video no. 2
2021-06-30 01:37:13,799 root INFO [
] Fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 6 Video no. 3
2021-06-30 01:37:13,807 root INFO [] Fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 7 Video no. 1
2021-06-30 01:37:13,809 root INFO [
] Fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 7 Video no. 2
2021-06-30 01:37:13,811 root INFO [] Fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 8 Video no. 2
2021-06-30 01:37:13,812 root INFO [
] Fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 8 Video no. 3
2021-06-30 01:37:13,817 root INFO [] Fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 9 Video no. 2
2021-06-30 01:37:13,819 root INFO [
] Fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 10 Video no. 1
2021-06-30 01:37:13,825 root INFO [] Fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 10 Video no. 2
2021-06-30 01:37:13,827 root INFO [
] Fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 11 Video no. 1
2021-06-30 01:37:13,829 root INFO [] Fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 11 Video no. 3
2021-06-30 01:37:13,831 root INFO [
] Fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 12 Video no. 3
2021-06-30 01:37:22,377 root INFO [] Writing 02 - Exploring chart types.srt
2021-06-30 01:37:22,382 root INFO [
] Done fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 8 Video no. 2
2021-06-30 01:37:26,885 root INFO [] Writing 04 - XLOOKUP and lookup functions.mp4
2021-06-30 01:37:28,408 root INFO [
] Writing 03 - Tracking changes.srt
2021-06-30 01:37:28,413 root INFO [] Done fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 12 Video no. 3
2021-06-30 01:37:30,253 root INFO [
] Writing 03 - Adjusting row heights and column widths.srt
2021-06-30 01:37:30,257 root INFO [] Done fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 5 Video no. 3
2021-06-30 01:37:30,561 root INFO [
] Writing 03 - Finding and replacing data.srt
2021-06-30 01:37:30,567 root INFO [] Done fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 6 Video no. 3
2021-06-30 01:37:31,483 root INFO [
] Writing 02 - Applying borders and color backgrounds.mp4
2021-06-30 01:37:32,762 root INFO [] Writing 02 - Copying a formula into adjacent cells.srt
2021-06-30 01:37:32,767 root INFO [
] Done fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 4 Video no. 2
2021-06-30 01:37:33,207 root INFO [] Writing 05 - Using Excel Help.mp4
2021-06-30 01:37:33,361 root INFO [
] Writing 02 - Splitting screens horizontally and vertically.mp4
2021-06-30 01:37:33,386 root INFO [] Writing 01 - What is Excel used for.srt
2021-06-30 01:37:33,389 root INFO [
] Done fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 2 Video no. 1
2021-06-30 01:37:44,973 root INFO [] Writing 02 - Working with dates and times.mp4
2021-06-30 01:37:46,120 root INFO [
] Writing 01 - Exploring data entry, editing, and AutoFill.srt
2021-06-30 01:37:46,124 root INFO [] Done fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 3 Video no. 1
2021-06-30 01:37:49,802 root INFO [
] Writing 01 - Using simple formulas.mp4
2021-06-30 01:37:50,509 root INFO [] Writing 01 - Sorting data.srt
2021-06-30 01:37:50,513 root INFO [
] Done fetching course 'Excel Essential Training (Office 365/Microsoft 365)' Chapter no. 11 Video no. 1
Traceback (most recent call last):
File "C:\Harsha\linkedin3\linkedin_learning.py", line 254, in
loop.run_until_complete(process())
File "C:\Python\Python39\lib\asyncio\base_events.py", line 642, in run_until_complete
return future.result()
File "C:\Harsha\linkedin3\linkedin_learning.py", line 242, in process
await fetch_courses()
File "C:\Harsha\linkedin3\linkedin_learning.py", line 102, in fetch_courses
return await asyncio.gather(*map(fetch_course, COURSES))
File "C:\Harsha\linkedin3\linkedin_learning.py", line 135, in fetch_course
await fetch_chapters(course)
File "C:\Harsha\linkedin3\linkedin_learning.py", line 147, in fetch_chapters
await asyncio.gather(*chain.from_iterable(fetch_chapter(course, chapter) for chapter in course.chapters))
File "C:\Harsha\linkedin3\linkedin_learning.py", line 175, in fetch_video
data = await resp.json()
File "C:\Python\Python39\lib\site-packages\aiohttp\client_reqrep.py", line 1092, in json
await self.read()
File "C:\Python\Python39\lib\site-packages\aiohttp\client_reqrep.py", line 1032, in read
self._body = await self.content.read()
File "C:\Python\Python39\lib\site-packages\aiohttp\streams.py", line 370, in read
block = await self.readany()
File "C:\Python\Python39\lib\site-packages\aiohttp\streams.py", line 392, in readany
await self._wait("readany")
File "C:\Python\Python39\lib\site-packages\aiohttp\streams.py", line 306, in _wait
await waiter
aiohttp.client_exceptions.ClientPayloadError: Response payload is not completed

Empty Folders

Traceback (most recent call last):
File "M:\linkedin-learning-video-downloader-master\linkedin-learning-video-downloader-master\linkedin_learning.py", line 225, in
loop.run_until_complete(process())
File "C:\Users\UserName\AppData\Local\Programs\Python\Python38-32\lib\asyncio\base_events.py", line 616, in run_until_complete
return future.result()
File "M:\linkedin-learning-video-downloader-master\linkedin-learning-video-downloader-master\linkedin_learning.py", line 213, in process
await fetch_courses()
File "M:\linkedin-learning-video-downloader-master\linkedin-learning-video-downloader-master\linkedin_learning.py", line 102, in fetch_courses
return await asyncio.gather(*map(fetch_course, COURSES))
File "M:\linkedin-learning-video-downloader-master\linkedin-learning-video-downloader-master\linkedin_learning.py", line 116, in fetch_course
await fetch_chapters(course)
File "M:\linkedin-learning-video-downloader-master\linkedin-learning-video-downloader-master\linkedin_learning.py", line 128, in fetch_chapters
await asyncio.gather(*chain.from_iterable(fetch_chapter(course, chapter) for chapter in course.chapters))
File "M:\linkedin-learning-video-downloader-master\linkedin-learning-video-downloader-master\linkedin_learning.py", line 162, in fetch_video
video_url = data['elements'][0]['selectedVideo']['url']['progressiveUrl']
KeyError: 'url'

KeyError: 'Url'

i have an error like this:

Traceback (most recent call last):
File "linkedin_learning.py", line 225, in
loop.run_until_complete(process())
File "E:\Program Files (x86)\Python38-32\lib\asyncio\base_events.py", line 616
, in run_until_complete
return future.result()
File "linkedin_learning.py", line 213, 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 162, in fetch_video
video_url = data['elements'][0]['selectedVideo']['Url']['progressiveUrl']
KeyError: 'Url'

asyncio error in both Mac and Windows

2019-09-17 13:40:28,289 asyncio DEBUG Using selector: SelectSelector
2019-09-17 13:40:28,293 root INFO [] -------------Login-------------
2019-09-17 13:40:28,293 root INFO [email protected]
2019-09-17 13:40:28,295 root INFO xxxxxxxxx
2019-09-17 13:40:28,295 root INFO [
] Login step 1 - Getting CSRF token...
2019-09-17 13:40:28,709 root DEBUG [] CSRF: 9fe47bf5-xxxx-4e53-xxxx-b44710de95e1
2019-09-17 13:40:28,709 root INFO [
] Login step 1 - Done
2019-09-17 13:40:28,711 root INFO [] Login step 2 - Logging In...
2019-09-17 13:40:29,314 root INFO [
] Login step 2 - Done
2019-09-17 13:40:29,315 root INFO [] -------------Done-------------
2019-09-17 13:40:29,316 root INFO [
] -------------Fetching Course-------------
2019-09-17 13:40:29,817 root INFO [*] Access to Learning Autodesk Inventor is DENIED
2019-09-17 13:40:29,827 asyncio ERROR Unclosed connection
client_connection: Connection<ConnectionKey(host='www.linkedin.com', port=443, is_ssl=True, ssl=False, proxy=None, proxy_auth=None, proxy_headers_hash=-1919483482)>
2019-09-17 13:40:29,829 root INFO [] Fetching course 'Learning Autodesk Inventor' Chapter no. 6 Video no. 3
2019-09-17 13:40:29,831 root INFO [
] Fetching course 'Learning Autodesk Inventor' Chapter no. 2 Video no. 3
2019-09-17 13:40:29,833 root INFO [] Fetching course 'Learning Autodesk Inventor' Chapter no. 4 Video no. 4
2019-09-17 13:40:29,836 root INFO [
] Fetching course 'Learning Autodesk Inventor' Chapter no. 5 Video no. 5
2019-09-17 13:40:29,838 root INFO [] Fetching course 'Learning Autodesk Inventor' Chapter no. 4 Video no. 1
2019-09-17 13:40:29,840 root INFO [
] Fetching course 'Learning Autodesk Inventor' Chapter no. 4 Video no. 5
2019-09-17 13:40:29,842 root INFO [] Fetching course 'Learning Autodesk Inventor' Chapter no. 6 Video no. 4
2019-09-17 13:40:29,842 root INFO [
] Fetching course 'Learning Autodesk Inventor' Chapter no. 4 Video no. 2
2019-09-17 13:40:29,843 root INFO [] Fetching course 'Learning Autodesk Inventor' Chapter no. 7 Video no. 1
2019-09-17 13:40:29,846 root INFO [
] Fetching course 'Learning Autodesk Inventor' Chapter no. 3 Video no. 6
2019-09-17 13:40:29,849 root INFO [] Fetching course 'Learning Autodesk Inventor' Chapter no. 4 Video no. 7
2019-09-17 13:40:29,849 root INFO [
] Fetching course 'Learning Autodesk Inventor' Chapter no. 3 Video no. 7
2019-09-17 13:40:29,852 root INFO [] Fetching course 'Learning Autodesk Inventor' Chapter no. 3 Video no. 4
2019-09-17 13:40:29,855 root INFO [
] Fetching course 'Learning Autodesk Inventor' Chapter no. 3 Video no. 5
2019-09-17 13:40:29,857 root INFO [] Fetching course 'Learning Autodesk Inventor' Chapter no. 5 Video no. 1
2019-09-17 13:40:29,860 root INFO [
] Fetching course 'Learning Autodesk Inventor' Chapter no. 3 Video no. 3
2019-09-17 13:40:29,862 root INFO [] Fetching course 'Learning Autodesk Inventor' Chapter no. 4 Video no. 6
2019-09-17 13:40:29,864 root INFO [
] Fetching course 'Learning Autodesk Inventor' Chapter no. 3 Video no. 2
2019-09-17 13:40:29,866 root INFO [] Fetching course 'Learning Autodesk Inventor' Chapter no. 3 Video no. 1
2019-09-17 13:40:29,866 root INFO [
] Fetching course 'Learning Autodesk Inventor' Chapter no. 5 Video no. 2
2019-09-17 13:40:29,871 root INFO [] Fetching course 'Learning Autodesk Inventor' Chapter no. 5 Video no. 3
2019-09-17 13:40:29,872 root INFO [
] Fetching course 'Learning Autodesk Inventor' Chapter no. 5 Video no. 4
2019-09-17 13:40:29,884 root INFO [] Fetching course 'Learning Autodesk Inventor' Chapter no. 1 Video no. 2
2019-09-17 13:40:29,887 root INFO [
] Fetching course 'Learning Autodesk Inventor' Chapter no. 1 Video no. 1
2019-09-17 13:40:29,888 root INFO [] Fetching course 'Learning Autodesk Inventor' Chapter no. 2 Video no. 1
2019-09-17 13:40:29,890 root INFO [
] Fetching course 'Learning Autodesk Inventor' Chapter no. 2 Video no. 2
2019-09-17 13:40:29,893 root INFO [] Fetching course 'Learning Autodesk Inventor' Chapter no. 6 Video no. 5
2019-09-17 13:40:29,896 root INFO [
] Fetching course 'Learning Autodesk Inventor' Chapter no. 8 Video no. 1
2019-09-17 13:40:29,898 root INFO [] Fetching course 'Learning Autodesk Inventor' Chapter no. 6 Video no. 1
2019-09-17 13:40:29,900 root INFO [
] Fetching course 'Learning Autodesk Inventor' Chapter no. 6 Video no. 2
2019-09-17 13:40:29,902 root INFO [] Fetching course 'Learning Autodesk Inventor' Chapter no. 5 Video no. 8
2019-09-17 13:40:29,904 root INFO [
] Fetching course 'Learning Autodesk Inventor' Chapter no. 7 Video no. 6
2019-09-17 13:40:29,908 root INFO [] Fetching course 'Learning Autodesk Inventor' Chapter no. 7 Video no. 7
2019-09-17 13:40:29,909 root INFO [
] Fetching course 'Learning Autodesk Inventor' Chapter no. 7 Video no. 4
2019-09-17 13:40:29,910 root INFO [] Fetching course 'Learning Autodesk Inventor' Chapter no. 5 Video no. 6
2019-09-17 13:40:29,911 root INFO [
] Fetching course 'Learning Autodesk Inventor' Chapter no. 7 Video no. 5
2019-09-17 13:40:29,913 root INFO [] Fetching course 'Learning Autodesk Inventor' Chapter no. 5 Video no. 7
2019-09-17 13:40:29,914 root INFO [
] Fetching course 'Learning Autodesk Inventor' Chapter no. 7 Video no. 2
2019-09-17 13:40:29,916 root INFO [] Fetching course 'Learning Autodesk Inventor' Chapter no. 4 Video no. 3
2019-09-17 13:40:29,919 root INFO [
] Fetching course 'Learning Autodesk Inventor' Chapter no. 7 Video no. 3
Traceback (most recent call last):
File ".\linkedin_learning.py", line 225, in
loop.run_until_complete(process())
File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python36-32\lib\asyncio\base_events.py", line 484, in run_until_complete
return future.result()
File ".\linkedin_learning.py", line 213, 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 162, in fetch_video
video_url = data['elements'][0]['selectedVideo']['url']['progressiveUrl']
KeyError: 'url'

Pin required

Trying to do my second course download I get the following error:

2020-06-14 13:48:07,881 root INFO [] Login step 1 - Done
2020-06-14 13:48:07,881 root INFO [
] Login step 2 - Logging In...
2020-06-14 13:48:08,518 root INFO [] Login step 2 - Done
2020-06-14 13:48:08,518 root INFO [
] -------------Done-------------
2020-06-14 13:48:08,518 root INFO [*] -------------Fetching Course-------------
Traceback (most recent call last):
File "linkedin_learning.py", line 225, in
loop.run_until_complete(process())
File "C:\Program Files (x86)\Python38-32\lib\asyncio\base_events.py", line 616, in run_until_complete
return future.result()
File "linkedin_learning.py", line 213, 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 111, in fetch_course
data = await resp.json()
File "C:\Program Files (x86)\Python38-32\lib\site-packages\aiohttp\client_reqrep.py", line 1026, in json
raise ContentTypeError(
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://www.linkedin.com/learning-api/detailedCourses??fields=videos&addParagraphsToTranscript=true&courseSlug=windows-management-with-system-center-configuration-manager&q=slugs')

And I also received an email with a pin number to login. Is there any way to send the pin received?

Regards

Fatal error in launcher: Unable to create process using

'"c:\users\shame\appdata\local\programs\python\python38-32\python.exe" "C:\Users\Shame\AppData\Local\Programs\Python\Python38-32\Scripts\pip.exe" install --trusted-host pypi.org --trusted-host files.pythonhosted.org -r .\requirements.txt': The system cannot find the file specified.

Using cookies

Is there a chance to use this with a cookie file? As the normal account is ordered under another subscription to login I get a deny:

2020-05-10 21:57:35,183 root INFO *@gmail.com
2020-05-10 21:57:35,184 root INFO ************
2020-05-10 21:57:35,184 root INFO [
] Login step 1 - Getting CSRF token...
2020-05-10 21:57:35,506 root DEBUG [
] CSRF: 4a244686-f98d-43a0-8d6f-99dc084b4f98
2020-05-10 21:57:35,507 root INFO [
] Login step 1 - Done
2020-05-10 21:57:35,507 root INFO [
] Login step 2 - Logging In...
2020-05-10 21:57:36,229 root INFO [
] Login step 2 - Done
2020-05-10 21:57:36,230 root INFO [
] -------------Done-------------
2020-05-10 21:57:36,231 root INFO [
] -------------Fetching Course-------------
2020-05-10 21:57:36,858 asyncio ERROR Unclosed connection
client_connection: Connection<ConnectionKey(host='www.linkedin.com', port=443, is_ssl=True, ssl=False, proxy=None, proxy_auth=None, proxy_headers_hash=-1165420784064433989)>
2020-05-10 21:57:36,861 root INFO [
] Access to Learning Python with PyCharm is DENIED

Can you modify it to use cookie file instead of uid/pass?

anyone help me solve this issue

Traceback (most recent call last):
File "C:\Python\Linkedin\linkedin-learning-downloader-master\lld.py", line 12, in
from config import USERNAME, PASSWORD, COURSES, PROXY, BASE_DOWNLOAD_PATH
File "C:\Python\Linkedin\linkedin-learning-downloader-master\config.py", line 5
COURSES = [Cisco Certified CyberOps Associate Cert Prep: 1 Security Concepts]
^
SyntaxError: invalid syntax

KeyError: 'transcript'

I get this error. Maybe a problem with German transcript?

Traceback (most recent call last):
File "C:\Users\Marcel\Downloads\linkedin-learning-video-downloader-master\linkedin-learning-video-downloader-master\linkedin_learning.py", line 246, in
loop.run_until_complete(process())
File "C:\Users\Marcel\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 642, in run_until_complete
return future.result()
File "C:\Users\Marcel\Downloads\linkedin-learning-video-downloader-master\linkedin-learning-video-downloader-master\linkedin_learning.py", line 231, in process
await fetch_collections()
File "C:\Users\Marcel\Downloads\linkedin-learning-video-downloader-master\linkedin-learning-video-downloader-master\linkedin_learning.py", line 106, in fetch_collections
return await asyncio.gather(*map(fetch_collection, COLLECTIONS))
File "C:\Users\Marcel\Downloads\linkedin-learning-video-downloader-master\linkedin-learning-video-downloader-master\linkedin_learning.py", line 120, in fetch_collection
await fetch_course(course['com.linkedin.learning.api.ListedCourse']['slug'])
File "C:\Users\Marcel\Downloads\linkedin-learning-video-downloader-master\linkedin-learning-video-downloader-master\linkedin_learning.py", line 134, in fetch_course
await fetch_chapters(course)
File "C:\Users\Marcel\Downloads\linkedin-learning-video-downloader-master\linkedin-learning-video-downloader-master\linkedin_learning.py", line 146, in fetch_chapters
await asyncio.gather(*chain.from_iterable(fetch_chapter(course, chapter) for chapter in course.chapters))
File "C:\Users\Marcel\Downloads\linkedin-learning-video-downloader-master\linkedin-learning-video-downloader-master\linkedin_learning.py", line 181, in fetch_video
subtitles = data['elements'][0]['selectedVideo']['transcript']['lines']
KeyError: 'transcript'

client_connection ERROR

Can You Help me out?

 raise ContentTypeError(
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://www.linkedin.com/learning-api/detailedLearningPlaylists/urn:li:learningCollection:668619***************')
2020-10-25 21:37:22,798 asyncio      ERROR    Unclosed connection
client_connection: Connection<ConnectionKey(host='www.linkedin.com', port=443, is_ssl=True, ssl=False, proxy=None, proxy_auth=None, proxy_headers_hash=4672340**************)>

Download failure

First of all, thanks a lot for this project!

But I have a problem when i want to download some courses. I use Debian 10.7 buster.

Here's the following error I always have:

Traceback (most recent call last): File "linkedin_learning.py", line 254, in <module> loop.run_until_complete(process()) File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete return future.result() File "linkedin_learning.py", line 242, 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 130, in fetch_course data = await resp.json() File "/home/*****/.local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 1103, 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=videos&addParagraphsToTranscript=true&courseSlug=*****&q=slugs')

I have the same problem on my other Windows 10 computer with python 3.6

Download failure

Hi @J3Patel , 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')

Download not complete

Even though I am a premium user, I am getting Access Denied message for the course "Learning Docker" in the log. However the videos are downloaded with subtitles, but they are of just few kilo bytes. Can you please look into what's going on in this?

021-03-07 13:24:29,569 asyncio DEBUG Using selector: EpollSelector 2021-03-07 13:24:29,570 root INFO [*] -------------Login------------- 2021-03-07 13:24:29,570 root INFO [email protected] 2021-03-07 13:24:29,570 root INFO bdjkfbsdkjfbds 2021-03-07 13:24:29,570 root INFO [*] Login step 1 - Getting CSRF token... 2021-03-07 13:24:30,307 root DEBUG [*] CSRF: 82ehi2d1-edc4-43e2-8ce0-bkoha5a6e2f0 2021-03-07 13:24:30,307 root INFO [*] Login step 1 - Done 2021-03-07 13:24:30,307 root INFO [*] Login step 2 - Logging In... 2021-03-07 13:24:32,158 root INFO [*] Login step 2 - Done 2021-03-07 13:24:32,159 root INFO [*] -------------Done------------- 2021-03-07 13:24:32,160 root INFO [*] -------------Fetching Course------------- 2021-03-07 13:24:33,518 asyncio ERROR Unclosed connection client_connection: Connection<ConnectionKey(host='www.linkedin.com', port=443, is_ssl=True, ssl=False, proxy=None, proxy_auth=None, proxy_headers_hash=-2960999056800462062)> 2021-03-07 13:24:33,521 root INFO [*] Access to Learning Docker is DENIED 2021-03-07 13:24:33,528 root INFO [~] Fetching course 'Learning Docker' Chapter no. 1 Video no. 1 2021-03-07 13:24:33,531 root INFO [~] Fetching course 'Learning Docker' Chapter no. 1 Video no. 2 2021-03-07 13:24:33,534 root INFO [~] Fetching course 'Learning Docker' Chapter no. 1 Video no. 3 2021-03-07 13:24:33,536 root INFO [~] Fetching course 'Learning Docker' Chapter no. 1 Video no. 4 2021-03-07 13:24:33,539 root INFO [~] Fetching course 'Learning Docker' Chapter no. 2 Video no. 1 2021-03-07 13:24:33,541 root INFO [~] Fetching course 'Learning Docker' Chapter no. 2 Video no. 2 2021-03-07 13:24:33,544 root INFO [~] Fetching course 'Learning Docker' Chapter no. 2 Video no. 3 2021-03-07 13:24:33,547 root INFO [~] Fetching course 'Learning Docker' Chapter no. 2 Video no. 4 2021-03-07 13:24:33,550 root INFO [~] Fetching course 'Learning Docker' Chapter no. 2 Video no. 5 2021-03-07 13:24:33,552 root INFO [~] Fetching course 'Learning Docker' Chapter no. 3 Video no. 1 2021-03-07 13:24:33,553 root INFO [~] Fetching course 'Learning Docker' Chapter no. 3 Video no. 2 2021-03-07 13:24:33,555 root INFO [~] Fetching course 'Learning Docker' Chapter no. 3 Video no. 3 2021-03-07 13:24:33,556 root INFO [~] Fetching course 'Learning Docker' Chapter no. 3 Video no. 4 2021-03-07 13:24:33,558 root INFO [~] Fetching course 'Learning Docker' Chapter no. 3 Video no. 5 2021-03-07 13:24:33,559 root INFO [~] Fetching course 'Learning Docker' Chapter no. 3 Video no. 6 2021-03-07 13:24:33,561 root INFO [~] Fetching course 'Learning Docker' Chapter no. 3 Video no. 7 2021-03-07 13:24:33,562 root INFO [~] Fetching course 'Learning Docker' Chapter no. 3 Video no. 8 2021-03-07 13:24:33,563 root INFO [~] Fetching course 'Learning Docker' Chapter no. 3 Video no. 9 2021-03-07 13:24:33,564 root INFO [~] Fetching course 'Learning Docker' Chapter no. 3 Video no. 10 2021-03-07 13:24:33,565 root INFO [~] Fetching course 'Learning Docker' Chapter no. 4 Video no. 1 2021-03-07 13:24:33,566 root INFO [~] Fetching course 'Learning Docker' Chapter no. 4 Video no. 2 2021-03-07 13:24:33,567 root INFO [~] Fetching course 'Learning Docker' Chapter no. 4 Video no. 3 2021-03-07 13:24:33,568 root INFO [~] Fetching course 'Learning Docker' Chapter no. 4 Video no. 4 2021-03-07 13:24:33,569 root INFO [~] Fetching course 'Learning Docker' Chapter no. 4 Video no. 5 2021-03-07 13:24:33,570 root INFO [~] Fetching course 'Learning Docker' Chapter no. 5 Video no. 1 2021-03-07 13:24:33,570 root INFO [~] Fetching course 'Learning Docker' Chapter no. 5 Video no. 2 2021-03-07 13:24:33,571 root INFO [~] Fetching course 'Learning Docker' Chapter no. 5 Video no. 3 2021-03-07 13:24:33,572 root INFO [~] Fetching course 'Learning Docker' Chapter no. 5 Video no. 4 2021-03-07 13:24:33,573 root INFO [~] Fetching course 'Learning Docker' Chapter no. 6 Video no. 1 2021-03-07 13:24:33,574 root INFO [~] Fetching course 'Learning Docker' Chapter no. 6 Video no. 2 2021-03-07 13:24:33,574 root INFO [~] Fetching course 'Learning Docker' Chapter no. 6 Video no. 3 2021-03-07 13:24:33,575 root INFO [~] Fetching course 'Learning Docker' Chapter no. 6 Video no. 4 2021-03-07 13:24:33,576 root INFO [~] Fetching course 'Learning Docker' Chapter no. 7 Video no. 1 2021-03-07 13:24:37,832 root INFO [~] Writing 03 - Kubernetes in AWS.mp4 2021-03-07 13:24:37,968 root INFO [~] Writing 01 - Setting up Docker.mp4 2021-03-07 13:24:38,017 root INFO [~] Writing 04 - Using the exercise files.srt 2021-03-07 13:24:38,046 root INFO [~] Done fetching course 'Learning Docker' Chapter no. 1 Video no. 4 2021-03-07 13:24:38,189 root INFO [~] Writing 04 - Install Docker on Windows.mp4 2021-03-07 13:24:38,479 root INFO [~] Writing 01 - What are Dockerfiles.mp4 2021-03-07 13:24:38,495 root INFO [~] Writing 02 - What you should know.srt 2021-03-07 13:24:38,499 root INFO [~] Done fetching course 'Learning Docker' Chapter no. 1 Video no. 2 2021-03-07 13:24:38,521 root INFO [~] Writing 01 - Why create containers using Docker.srt 2021-03-07 13:24:38,522 root INFO [~] Done fetching course 'Learning Docker' Chapter no. 1 Video no. 1 2021-03-07 13:24:38,558 root INFO [~] Writing 06 - Container networking.srt 2021-03-07 13:24:38,564 root INFO [~] Done fetching course 'Learning Docker' Chapter no. 3 Video no. 6 2021-03-07 13:24:39,258 root INFO [~] Writing 03 - Install Docker on Mac.mp4 2021-03-07 13:24:39,433 root INFO [~] Writing 05 - Avoid golden images.srt 2021-03-07 13:24:39,452 root INFO [~] Done fetching course 'Learning Docker' Chapter no. 4 Video no. 5 2021-03-07 13:24:39,538 root INFO [~] Writing 07 - Legacy linking.mp4 2021-03-07 13:24:39,545 root INFO [~] Writing 04 - Google Kubernetes Engine.mp4 2021-03-07 13:24:39,617 root INFO [~] Writing 04 - Multi-project Docker files.mp4 2021-03-07 13:24:39,697 root INFO [~] Writing 09 - Volumes.mp4 2021-03-07 13:24:39,798 root INFO [~] Writing 03 - Run processes in containers.mp4 2021-03-07 13:24:39,899 root INFO [~] Writing 02 - Docker Desktop.mp4 2021-03-07 13:24:40,081 root INFO [~] Writing 03 - What is Docker.mp4 2021-03-07 13:24:40,120 root INFO [~] Writing 04 - Storage.mp4 2021-03-07 13:24:40,152 root INFO [~] Writing 03 - Processes and cgroups.mp4 2021-03-07 13:24:40,177 root INFO [~] Writing 10 - Docker registries.mp4 2021-03-07 13:24:40,797 root INFO [~] Writing 01 - The Docker flow Images to containers.mp4 2021-03-07 13:24:41,389 root INFO [~] Writing 08 - Images.srt 2021-03-07 13:24:41,390 root INFO [~] Done fetching course 'Learning Docker' Chapter no. 3 Video no. 8 2021-03-07 13:24:41,420 root INFO [~] Writing 01 - Next steps.srt 2021-03-07 13:24:41,421 root INFO [~] Done fetching course 'Learning Docker' Chapter no. 7 Video no. 1 2021-03-07 13:24:44,345 root ERROR Connection Error: Server disconnected

Single Sign On

Hi

Is there a way to circumvent the Single Sign On step I need to go through because my Linkedin Learning account is linked to my business account?

So when not on my work laptop, I log into Linkedin and then need and organisation SSO step before I see the info.

what to change in the code to either circumvent, or only run the code when I'm logged into Linkedin learning already?

Thanks

Empty folders

2020-03-04 03:18:34,996 root INFO [] Access to WordPress: Workflows is DENIED
2020-03-04 03:18:34,998 root INFO [] Fetching course 'WordPress: Workflows' Chapter no. 1 Video no. 1
2020-03-04 03:18:35,000 root INFO [
] Fetching course 'WordPress: Workflows' Chapter no. 1 Video no. 2
2020-03-04 03:18:35,002 root INFO [~] Fetching course 'WordPress: Workflows' Chapter no. 1 Video no. 3
...
...
2020-03-04 03:18:35,109 root INFO [
] Access to Advanced WordPress: Action and Filter Hooks is DENIED
2020-03-04 03:18:35,116 root INFO [*] Access to WordPress 5 Essential Training is DENIED
2020-03-04 03:18:35,123 root INFO [~] Fetching course 'Advanced WordPress: Action and Filter Hooks' Chapter no. 1 Video no. 1

Do someone knows why happen this?

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.