ahmedayman4a / Linkedin-Learning-Courses-Downloader

Download LinkedIn Learning Courses in mp4 format and in the video quality you like with an intuitive UI
424 stars 135 forks source link

Large exercise videos downloads fail #34

Open FascinationSt opened 2 years ago

FascinationSt commented 2 years ago

When downloading a course with an exercise file over 2 GB, the download fails and the program generates error, "A fatal error occurred while downloading the course. Check the logs for more info". The course is downloaded, and a file is downloaded, but not the complete exercise file. For example, the course: https://www.linkedin.com/learning/premiere-pro-cc-2019-essential-training-the-basics-2/welcome-3?autoAdvance=true&autoSkip=false&autoplay=true&resume=true&u=107515114

pcpepik commented 2 years ago

Got the same error after the first ~2GB of the file were downloaded:

Course: https://www.linkedin.com/learning/photoshop-2020-essential-training-photography/

2022-03-06 00:34:08.367 -10:00 [ERR] An fatal error occured while downloading the course
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentOutOfRangeException: Value of '-95' is not valid for 'Value'. 'Value' should be between 'minimum' and 'maximum'.
Parameter name: Value
   at LLCD.DownloaderGUI.DownloaderForm.<DownloadCourse>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at LLCD.DownloaderGUI.DownloaderForm.<DownloaderForm_Load>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.RunDialog(Form form)
   at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
   at System.Windows.Forms.Form.ShowDialog()
   at LLCD.DownloaderGUI.MainForm.<ExtractAndDownloadAsync>d__6.MoveNext()
2022-03-06 00:38:14.657 -10:00 [INF] Validating Input
2022-03-06 00:38:15.603 -10:00 [INF] Input Valid

Course: https://www.linkedin.com/learning/time-lapse-video-nighttime

2022-03-06 01:06:06.986 -10:00 [ERR] An fatal error occured while downloading the course
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentOutOfRangeException: Value of '-64' is not valid for 'Value'. 'Value' should be between 'minimum' and 'maximum'.
Parameter name: Value
   at LLCD.DownloaderGUI.DownloaderForm.<DownloadCourse>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at LLCD.DownloaderGUI.DownloaderForm.<DownloaderForm_Load>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.RunDialog(Form form)
   at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
   at System.Windows.Forms.Form.ShowDialog()
   at LLCD.DownloaderGUI.MainForm.<ExtractAndDownloadAsync>d__6.MoveNext()
2022-03-06 01:08:51.385 -10:00 [INF] Validating Input
2022-03-06 01:08:52.465 -10:00 [INF] Input Valid
Jowi767 commented 2 years ago

Don't download exercise files from the program, download them from the linkedin learning page.

pcpepik commented 2 years ago

@Jowi767 that is the current workaround but this does not fix the issue with the downloader

ahmedayman4a commented 2 years ago

Unfortunately, this is the downside of the downloader class I currently use. Fixing would mean using a different package and rewiting alot of the downloader code.

Lewis8379 commented 2 years ago

Same here, also experiencing errors once the download reaches 2GB

The solution to me to get around what developer @ahmedayman4a said, is to behave differently. If I'm downloading 20 courses, and one with files larger than 2GB is the 2nd course, then the download fails and all other 18 courses need to be re-extracted.

Some sort of error that allows me to skip without halting the rest of the operation would certainly be helpful? Same applies to all other errors, the ability to skip would be a solution that is hopefully doable without different packages?

ahmedayman4a commented 2 years ago

I am adding this to the new update that I am working on

Lewis8379 commented 2 years ago

Sounds great, I've also had errors for courses that are just bugged out. It might download the first and second folder, create the third, but not download anything to it, even though the course may have five folders worth of content. The logs aren't too helpful for me to understand as a noob, but I'd be happy if I could just skip the course (providing the dialog tells me what course has the problem) and not waste the extraction of the other stuff.

Let me send some Kofi's your way. That will help show my love.

ahmedayman4a commented 2 years ago

Wow my thanks, I really appreciate it. As for your bugs, make a new issue and upload your log file