From 9c8003a17fac615602ceb437fb00d1bd12d80703 Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Thu, 30 May 2019 23:46:44 -0700 Subject: [PATCH] Properly handle deleted videos --- cmd/updater/updater.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/updater/updater.py b/cmd/updater/updater.py index a276c63..fa31547 100644 --- a/cmd/updater/updater.py +++ b/cmd/updater/updater.py @@ -77,7 +77,10 @@ def get_updates(start, count, url, fmt, last_id=None, link_type=None): break # Query video metadata from YouTube - result = ytdl.process_ie_result(entry, download=False) + try: + result = ytdl.process_ie_result(entry, download=False) + except youtube_dl.utils.DownloadError: + continue # Convert '20190101' to unix time date_str = result.get('upload_date')