TRoboto / datacamp-downloader

Download your completed courses on Datacamp easily!
MIT License
178 stars 52 forks source link

Ignore downloading exercise videos when `projector_key` is None #34

Closed atlonxp closed 3 years ago

atlonxp commented 3 years ago

The downloader is error when the projector_key is None, causing failure in the following lines:

video = self._get_video(exercise.data.get("projector_key")) # --> video = None
...
if videos and video.video_mp4_link # --> NoneType has no video_mp4_link
TRoboto commented 3 years ago

Have you encountered any issue with it? If so please provide with which course.

atlonxp commented 3 years ago

2003 if I can remember. It is a random course ID, and it works fine until I found the error.

Have a look. i have also asked for pull request.

There is another one when exercise cannot be pulled (aka None)

atlonxp commented 3 years ago

changed as your recommended

TRoboto commented 3 years ago

Thank you for your contribution.