From 22755665f3292998bcff5c45c61e076d0f970bdd Mon Sep 17 00:00:00 2001 From: YeZheng Date: Sat, 9 Dec 2023 12:06:37 +0800 Subject: [PATCH] updated to version 0.12.3; check if the url exists when downloading resources --- README.md | 4 ++-- coursera_helper/__init__.py | 2 +- coursera_helper/workflow.py | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 33dc51d0..dceb3bd0 100644 --- a/README.md +++ b/README.md @@ -207,7 +207,7 @@ Find your coursera CAUTH: 4. find and click CAUTH > Copy value CAUTH -**Firefox **: +**Firefox**: 1. Open the browser and login to https://www.coursera.org/ @@ -231,7 +231,7 @@ If you are from China and you're having problems downloading videos, adding in the hosts file (`/etc/hosts` or `C:\Windows\System32\drivers\etc`) -Refresh DNS with this command in the terminal. +Flush DNS with this command in the terminal. ``` ipconfig /flushdns diff --git a/coursera_helper/__init__.py b/coursera_helper/__init__.py index 92a60bdf..c4e914ae 100644 --- a/coursera_helper/__init__.py +++ b/coursera_helper/__init__.py @@ -1 +1 @@ -__version__ = '0.12.2' +__version__ = '0.12.3' diff --git a/coursera_helper/workflow.py b/coursera_helper/workflow.py index 56143acd..f742778d 100644 --- a/coursera_helper/workflow.py +++ b/coursera_helper/workflow.py @@ -220,6 +220,10 @@ def _handle_resource(self, url, fmt, lecture_filename, callback, last_update): resume = self._args.resume skip_download = self._args.skip_download + if not url: + logging.info('Downloading: %s failed, url does not exists', lecture_filename) + return last_update + # Decide whether we need to download it if overwrite or not os.path.exists(lecture_filename) or resume: if not skip_download: