From 50a4b7af45c824dfa162b32bdcf0444d79fd5c4f Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Wed, 28 Apr 2021 00:55:29 +1200 Subject: [PATCH] Add a handler for ytdl search request message --- extractors/video.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extractors/video.py b/extractors/video.py index f794b8b..f4da76e 100644 --- a/extractors/video.py +++ b/extractors/video.py @@ -189,6 +189,10 @@ def extract_video(id): message = message.replace("Video unavailable\n", "") # Remove redundant lead string, if present else: message = "Unknown extraction error." + + if "is not a valid URL." in message: + message = "Not a valid video ID." + result = { "error": message }