Open Digi-Ralph opened 1 year ago
https://i.imgur.com/svpy0D0.png
basically index [6] in the sources array doesn't exist o it fails how to fix this ? i'm not python scripter but at leat how to make it skip the video and move on
I created https://github.com/PhanTinhKhang/Skillshare-69DL/pull/2 which fixes my IndexError. If you still encounter it, give me a course id to check it.
In skillshare.py change
if meta_res.json()['sources'][6]['container'] == 'MP4' and 'src' in meta_res.json()['sources'][6]:
dl_url = meta_res.json()['sources'][6]['src']
# break
else:
to
try:
if meta_res.json()['sources'][6]['container'] == 'MP4' and 'src' in meta_res.json()['sources'][6]:
dl_url = meta_res.json()['sources'][6]['src']
# break
else:
dl_url = meta_res.json()['sources'][1]['src']
except IndexError:
dl_url = meta_res.json()['sources'][1]['src']
Mind the spaces, I did it on my phone. Each indentation should be 4 spaces. Something is wrong with my font/screen right now. whoops....
doesn't download certain courses or it doesn't download the full list ..
Traceback (most recent call last): File "/root/.Skillshare-DL/dl.py", line 16, in
main()
File "/root/.Skillshare-DL/dl.py", line 11, in main
dl.download_course_by_url(course_url)
File "/root/.Skillshare-DL/skillshare.py", line 32, in download_course_by_url
self.download_course_by_class_id(m.group(1))
File "/root/.Skillshare-DL/skillshare.py", line 88, in download_course_by_class_id
video_id=video_id,
File "/root/.Skillshare-DL/skillshare.py", line 147, in download_video
if meta_res.json()['sources'][6]['container'] == 'MP4' and 'src' in meta_res.json()['sources'][6]:
IndexError: list index out of range