Jayapraveen / INE-courses-downloader

Python Script to download coures from INE.com website for personal and educational use
GNU General Public License v3.0
39 stars 19 forks source link

Different access_pass captions for the courses #15

Closed c0nr3f closed 3 years ago

c0nr3f commented 3 years ago

course["access"]["related_passes"][0]["name"] does not longer match the gathered strings in access_pass.

Some new captions are for example "B2B Enterprise" or "B2C Premium" as seen in all_courses.

Manipulating the script by changing line 458 from

if(course["access"]["related_passes"][0]["name"] in access_pass):

to

if(course["access"]["related_passes"][0]["name"] == "B2B Enterprise"):

will only download the video material of the course.

Jayapraveen commented 3 years ago

Hello @c0nr3f , Thankyou for the suggestion, I have tried to fix this issue in commit (6ea35ca). You can try that or newer. Your solution will also work if you have the pass. Since some of the users do not have the enterprise pass, I have made a function to check if the course you selected is included in your subscription, thereby fixing this issue.