Jayapraveen / INE-courses-downloader

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

KeyError: 'name' #47

Closed Aval0n1 closed 1 year ago

Aval0n1 commented 1 year ago

Hi folks. I am getting the error 'KeyError: 'name' while trying to download "OSPF"(it's 42 in the courses list). First of all I thought it's because of Windows machine where I run the script file. But attempt to run the script on a linux machine gave me the same error. Please help.

Downloading: OSPF: 0%| | 0.00/1.00 [00:03<?, ?course/s] Traceback (most recent call last):
File "Ine.py", line 726, in
downloader(course)
File "Ine.py", line 585, in downloader
download_lab(k["uuid"], lab_index)
File "Ine.py", line 305, in download_lab
subfolder_name = 'Lab'+str(lab_index)+'.'+data["name"]
KeyError: 'name'

Aval0n1 commented 1 year ago

I guess I found the root cause. There are two "OSPF" courses. 42 and 1006. The same for EIGRP 41 and 1007. I've never tried to download EIGRP 41, but downloaded successfully 1007. Seems like the script parses the old courses as well. Shit script shows courses even not listed on the website 87. Basics 88. Enterprise Networks. Well quick review shows that courses above 135. Investigating Juniper's Junos CLI should be fine. But below must be reviewed manually.