ahmedayman4a / Linkedin-Learning-Courses-Downloader

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

[BUG] Failed to extract a video course. #41

Open franzgeneroso1998 opened 2 years ago

franzgeneroso1998 commented 2 years ago

Describe the bug Failed to extract a video course. The provided token is probably invalid.

Operating System Microsoft Windows 11 Pro

Log File log.txt

ahmedayman4a commented 2 years ago

The log you provided is not from the app. Please upload the logs at %localappdata%l\Linkedin-Learning-Courses-Downloader\app-1.2.0\logs But most of the time this error happens because the token you provided doesn't have full access to the course. Do you have premium subscription on your LinkedIn account?

binbohrawa commented 2 years ago

@ahmedayman4a I ran into the same problem, I'm using MS Win11Pro as well, here's the log file log20220603.txt

ahmedayman4a commented 2 years ago

It seems that the problem is that the extractor can't access one or more videos of this course.

binbohrawa commented 2 years ago

It seems that the problem is that the extractor can't access one or more videos of this course.

  • Can you make sure that you can access the videos on linkedin-learning with this account?
  • How did you extract the authentication token? With the extract token button or manually?
  • What kind of account do you have? Do you have an organization account like a library account or a normal private account?

I have private linkedin learning premium account, I can access videos via the browser with no problem I did both ways for token extraction and I compare them both of them are the same.

ahmedayman4a commented 2 years ago

Does this issue happen at the very start of the extraction process or later?

ahmedayman4a commented 2 years ago

Try running this app instead. It should have much more logging to be able to understand the cause of this issue better since I can't seem to reproduce this issue on my pc.

Linkedin Learning Courses Downloader - v1.3-alpha.1.zip

franzgeneroso1998 commented 2 years ago

Thanks for your help sir, I really appreciate your great work! God bless you!

On Sun, Jun 5, 2022 at 12:52 AM Ahmed Ayman @.***> wrote:

Try running this app instead. It should have much more logging to be able to understand the cause of this issue better since I can't seem to reproduce this issue on my pc.

Linkedin Learning Courses Downloader - v1.3-alpha.1.zip https://github.com/ahmedayman4a/Linkedin-Learning-Courses-Downloader/files/8838284/Linkedin.Learning.Courses.Downloader.-.v1.3-alpha.1.zip

— Reply to this email directly, view it on GitHub https://github.com/ahmedayman4a/Linkedin-Learning-Courses-Downloader/issues/41#issuecomment-1146648696, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYSCFDUM3OXXST2X7T2JFIDVNOCVNANCNFSM5SSD275Q . You are receiving this because you authored the thread.Message ID: <ahmedayman4a/Linkedin-Learning-Courses-Downloader/issues/41/1146648696@ github.com>

binbohrawa commented 2 years ago

Unfortunately this alpha version didn't run at all on my PC, I'm using MS Win11Pro..

AlTahish commented 2 years ago

The same problem with win10 I tried all options but without success

The Problem appears with some courses only

One of these courses is: https://www.linkedin.com/learning/agile-software-development-scrum-for-developers

This is the Error from log file: 2022-06-24 06:58:38.987 -07:00 [INF] Validating Input 2022-06-24 06:58:39.498 -07:00 [INF] Input Valid 2022-06-24 06:58:57.834 -07:00 [ERR] Course Extraction Failedhttps://www.linkedin.com/learning/agile-software-development-scrum-for-developers System.ArgumentException: Failed to extract a course video. The provided token is probably invalid at LLCD.CourseExtractor.Extractor.d15.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.MainForm.d7.MoveNext()

I hope you can fix it :)

Edit: I solved the problem by browsing all the content of the course and skipping videos to unlock the lock that appears on them then trying to download it and it's done :)

method 2: retry clicking the download button until its done

method 3: if the course is short it will be done and if its not it will take longer to done

danilotomaccio commented 2 years ago

Same problem here on MacOS Monterey (and I have a Premium account)

danilotomaccio commented 2 years ago

Doing some tests, it seems that the problem is posed on some videos of the course in a random way. However, it seems that making a second attempt on the videos that the first time are not accessible solves the problem so the problem can be solved quickly: during extraction, if a video is not accessible (or does not contain the downloadUrl) just repeat the request.

Here (line 127 of the Extractor.cs file):

if (String.IsNullOrWhiteSpace(video.DownloadUrl))
    {

        // Try again the request

        var cookies = _cookieContainer.GetCookies(new Uri("https://www.linkedin.com/learning-api"));
        throw new ArgumentException("Failed to extract a course video. The provided token is probably invalid");
    }
YisroelTech commented 2 years ago

FYI, I tried this same courses as @binbohrawa & @AlTahish, and they extracted (and started downloading) just fine.