Linkedin-Learning-Courses-Downloader icon indicating copy to clipboard operation
Linkedin-Learning-Courses-Downloader copied to clipboard

[BUG] Failed to extract a video course.

Open franzgeneroso1998 opened this issue 2 years ago • 12 comments

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

franzgeneroso1998 avatar Apr 05 '22 09:04 franzgeneroso1998

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?

ahmedayman4a avatar Apr 05 '22 12:04 ahmedayman4a

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

binbohrawa avatar Jun 03 '22 11:06 binbohrawa

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?

ahmedayman4a avatar Jun 04 '22 14:06 ahmedayman4a

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.

binbohrawa avatar Jun 04 '22 14:06 binbohrawa

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

ahmedayman4a avatar Jun 04 '22 16:06 ahmedayman4a

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

ahmedayman4a avatar Jun 04 '22 16:06 ahmedayman4a

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>

franzgeneroso1998 avatar Jun 05 '22 02:06 franzgeneroso1998

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

binbohrawa avatar Jun 05 '22 10:06 binbohrawa

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.<GetCourse>d__15.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.<ExtractCourse>d__7.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

AlTahish avatar Jun 24 '22 07:06 AlTahish

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

danilotomaccio avatar Jul 15 '22 18:07 danilotomaccio

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");
    }

danilotomaccio avatar Jul 18 '22 13:07 danilotomaccio

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

YisroelTech avatar Aug 31 '22 16:08 YisroelTech