Puyodead1 / udemy-downloader

A Udemy downloader that can download courses, with DRM support.
MIT License
1.26k stars 291 forks source link

[Bug]: Unable to extract arguments from course page! Make sure you have a cookies.txt file! #185

Closed tranthanhbinh2603 closed 11 months ago

tranthanhbinh2603 commented 11 months ago

What happened?

I always get the error "Unable to extract arguments from course page! Make sure you have a cookies.txt file!" when I try to load a course in my Personal Plans course. Whether I tried adding the argument "--browser chrome" or "--browser firefox". Or I even leave out the argument and add the cookies.txt file into the directory but still no success.

Here is my entire process:

First, i use this command:

main.py -c https://www.udemy.com/course/unitycourse/ --download-captions -l en --download-assets --browser chrome

Second, i use this command:

main.py -c https://www.udemy.com/course/unitycourse/ --download-captions -l en --download-assets --browser firefox

Third, i create a file cookies.txt in the folder install: image And create a json cookies by https://chrome.google.com/webstore/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm Copy it and paste in file cookies.txt And run this command

main.py -c https://www.udemy.com/course/unitycourse/ --download-captions -l en --download-assets

I try by Netspace Cookies in that extension, but all three method return the same result:

[03:43:43] [udemy-downloader] [pre_run:325] INFO: Output directory set to C:\udemy-downloader-master\out_dir
[03:43:44] [udemy-downloader] [main:1938] INFO: > Fetching course information, this may take a minute...
[03:43:47] [udemy-downloader] [_extract_subscription_course_info:938] CRITICAL: Unable to extract arguments from course page! Make sure you have a cookies.txt file!

So, how can I get cookies for course downloads in my Personal Plans?

Expected Result

I can download the course (I already have the ID KEY and decryption KEY)

Branch

master/main

What operating systems are you seeing the problem on?

Windows

Relevant log output

[03:57:14] [udemy-downloader] [pre_run:325] INFO: Output directory set to C:\udemy-downloader-master\out_dir
[03:57:14] [udemy-downloader] [main:1938] INFO: > Fetching course information, this may take a minute...
[03:57:17] [udemy-downloader] [_extract_subscription_course_info:938] CRITICAL: Unable to extract arguments from course page! Make sure you have a cookies.txt file!

Other information

OS: Win 10 Pro build 19045.3448

Puyodead1 commented 11 months ago

You didn't use -sc

tranthanhbinh2603 commented 11 months ago

But it's not work.

tranthanhbinh2603 commented 11 months ago

The command i tried:

main.py -c https://www.udemy.com/course/unitycourse --browser firefox --subscription-course
main.py -c https://www.udemy.com/course/unitycourse -sc --browser chrome
main.py -c https://www.udemy.com/course/unitycourse -sc --browser firefox
main.py -sc -c https://www.udemy.com/course/unitycourse --browser firefox

But all return 1 result:

[10:04:24] [udemy-downloader] [pre_run:323] INFO: Output directory set to D:\Downloads\Compressed\udemy-downloader-master\out_dir
[10:04:24] [udemy-downloader] [main:1907] INFO: > Fetching course information, this may take a minute...
[10:04:26] [udemy-downloader] [_extract_subscription_course_info:919] CRITICAL: Unable to extract arguments from course page! Make sure you have a cookies.txt file!

Can you give me a solution again?

Puyodead1 commented 11 months ago

Try adding /learn/ to the url

tranthanhbinh2603 commented 11 months ago

Try adding /learn/ to the url

It works. Thank you very much.