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

mkdir OS Error #33

Open telus-beep opened 2 years ago

telus-beep commented 2 years ago

Can some one fix this issue

Downloading: 1.Introduction to Monitoring, Strategy and Culturemp4-hd.mp4: 100%|█| 1.00/1.00 [00:02<00:0 Downloading: 5.5 Leadership Principles_mp4-hd.mp4: 100%|██████| 5.00/5.00 [01:00<00:00, 12.0s/videofile] Downloading: Monitoring & Quality Assurance: 0%| | 0.00/1.00 [01:02<?, ?course/s] Traceback (most recent call last): File "Ine2.py", line 479, in downloader(course) File "Ine2.py", line 352, in downloader os.makedirs(subfolder_name) File "/usr/lib64/python3.6/os.py", line 220, in makedirs mkdir(name, mode) OSError: [Errno 22] Invalid argument: '3.Lab 1: Managing Technical Debt with SonarQube'

ghost commented 2 years ago

It's the labname have a : in it.

make a string replace like so above the osmakedirs

subfolder_name= subfolder_name.replace(':', '')

3.Lab 1: Managing Technical Debt with SonarQube

after

3.Lab 1 Managing Technical Debt with SonarQube