From 5809a373c49ec68e952f35c5d99d7f5efed919ea Mon Sep 17 00:00:00 2001 From: Georg Teufelberger Date: Sun, 27 Nov 2022 18:03:40 +0100 Subject: [PATCH 1/2] Catch error caused by audio-only recordings --- vo-scraper.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vo-scraper.py b/vo-scraper.py index f39c38e..eb6fff3 100755 --- a/vo-scraper.py +++ b/vo-scraper.py @@ -549,7 +549,12 @@ def vo_scrapper(vo_link, video_quality, user, passw): video_json_data = json.loads(r.text) # Get video src url from json based on resolution - video_src_link, available_video_quality = get_video_src_link_for_resolution(video_json_data, video_quality) + try: + video_src_link, available_video_quality = get_video_src_link_for_resolution(video_json_data, video_quality) + except IndexError: + # Audio only lectures error out, skip them + print_information(f"Couldn't get download link for recording {item_nr}. Skipping", type='warning') + continue lecture_title = vo_json_data['title'] episode_title = vo_json_data["episodes"][item_nr]["title"] From e763e315dfe53fa90ced696f74e5ac9ef6db5355 Mon Sep 17 00:00:00 2001 From: Georg Teufelberger Date: Sun, 27 Nov 2022 18:06:04 +0100 Subject: [PATCH 2/2] Bump version number to 3.2.1 --- VERSION | 2 +- vo-scraper.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index a4f52a5..0444f32 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.2.0 \ No newline at end of file +3.2.1 \ No newline at end of file diff --git a/vo-scraper.py b/vo-scraper.py index eb6fff3..19fcfaa 100755 --- a/vo-scraper.py +++ b/vo-scraper.py @@ -48,7 +48,7 @@ gitlab_issue_page = gitlab_repo_page + "issues" gitlab_changelog_page = gitlab_repo_page + "-/tags/v" remote_version_link = gitlab_repo_page + "raw/master/VERSION" -program_version = '3.2.0' +program_version = '3.2.1' # For web requests user_agent = 'Mozilla/5.0'