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

download does not work for courses with slides #24

Open dexter101010 opened 3 years ago

dexter101010 commented 3 years ago

Hi bro,

Here is what i get when i am trying to download a course that contain slides :

Downloading: PenetrationTestingWiFiSecurity: 0%| | 0.00/1.00 [01:06<?, ?course/s] Traceback (most recent call last): File "Ine.py", line 682, in downloader(course) File "Ine.py", line 557, in downloader download_slides(k["uuid"], slide_index) File "Ine.py", line 395, in download_slides fp.write(out.text) File "C:\Program Files\Python38\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\ufffd' in position 4059: character maps to

I am using win10.

In linux (kali linux) i get the following error when i am trying to use the script :

" File "Ine.py", line 647 p.map(downloader,(all_courses[j] for j in range(i, this_session) if (False if (len(all_courses[j]["access"]["related_passes"]) == 0) else True if (course_has_access(all_courses[j])) else False) and 1 or print("Course not in subscription access pack. Skipping .."))) ^ SyntaxError: invalid syntax "

Jayapraveen commented 3 years ago

I will have to check this one. Use Python 3.6+ to resolve the issue in Linux

telus-beep commented 3 years ago

I will have to check this one. Use Python 3.6+ to resolve the issue in Linux

Hi, do you mind addressing other issue ? the script does not work for me, its the same subscription issue for site rip and individual course. I have full access to all the INE website.

choose Preferred Video Quality 1.Highest Available Quality (1080p) 2.Next To Highest Quality (720p) 1 Warning! This is a high compute and throughput functionality and needs lots and lots of compute time and storage space Enter "I agree" to acknowledge and proceed! I agree

Initializing for Site dump

0%| | 0/1 [00:00<?, ?it/s] Courses to be downloaded this batch: 0 to 1 Course not in subscription access pack. Skipping ..

Course batch successfully completed downloading.. Starting Next batch..

Courses to be downloaded this batch: 1 to 2 | 0/1 [00:00<?, ?it/s] Course not in subscription access pack. Skipping ..

Course batch successfully completed downloading.. Starting Next batch..

Courses to be downloaded this batch: 2 to 3 Course not in subscription access pack. Skipping .. | 0/1 [00:00<?, ?it/s]

Course batch successfully completed downloading.. Starting Next batch..

Courses to be downloaded this batch: 3 to 4 Course not in subscription access pack. Skipping .. 0%| | 0/1 [00:00<?, ?it/s] Course batch successfully completed downloading.. Starting Next batch..

Courses to be downloaded this batch: 4 to 5 Course not in subscription access pack. Skipping ..

Course batch successfully completed downloading.. Starting Next batch.. | 0/1 [00:00<?, ?it/s]

Courses to be downloaded this batch: 5 to 6 Course not in subscription access pack. Skipping ..

tanushshukla commented 3 years ago

I have fixed this issue as well on windows. @Jayapraveen I can raise the PR for this as well.

Andre-pwn commented 2 years ago

how did you solved @tanushshukla? I'm having the same one with video files

tanushshukla commented 2 years ago

yes, I Fixed it. I forked and created a new branch which has the fix.

I don't have an active subscription to test it right now. But should be working still hopefully.