Today, I encountered a problem while trying to download a few courses from my Coursera.org account. I attempted to use Google Colab with this notebook: link.
However, I encountered an error when attempting to download. The error is “HTTPError 404 Client Error: Not Found for url: https://api.coursera.org/api/onDemandCourseMaterials.v1”.
To resolve this issue, I discovered a simple solution. Follow these steps:
- Open your Colab playbook.
- Inside your Google Drive, create a folder called “git”.
- In a new cell, enter the following commands:
%cd drive/MyDrive/git/ !pwd !git clone https://github.com/raffaem/coursera-dl %cd coursera-dl !pip3 install .
This will install “coursera-dl” with the error fixed, as mentioned in this GitHub issue comment.
After completing the installation, you can use this Colab notebook to download Coursera courses to your Google Drive: link.
Here is the simplified version of the Colab notebook:
%cd drive/MyDrive/git/ !pwd !git clone https://github.com/raffaem/coursera-dl %cd coursera-dl !pip3 install . pip install coursera-GDrive from coursera_gdrive import CourseraDownloader # Import downloader class. cauth = "YOUR_CAUTH_TOKEN_HERE" # Enter your CAUTH Token here. downloader.login(cauth) downloader.printEnrolledCourses() downloader.download() # Download all the enrolled courses.
Credit goes to the following repositories:
- Coursera-dl: https://github.com/coursera-dl/coursera-dl
- Coursera-GDrive: https://github.com/kaanari/Coursera-GDrive
I hope this solution helps you resolve the issue. Have a good day! 🙂