1
0
mirror of https://git.sr.ht/~cadence/NewLeaf synced 2024-11-22 07:37:29 +00:00

Add a handler for ytdl search request message

This commit is contained in:
Cadence Ember 2021-04-28 00:55:29 +12:00
parent e3595a455e
commit 50a4b7af45
No known key found for this signature in database
GPG Key ID: BC1C2C61CF521B17

View File

@ -189,6 +189,10 @@ def extract_video(id):
message = message.replace("Video unavailable\n", "") # Remove redundant lead string, if present message = message.replace("Video unavailable\n", "") # Remove redundant lead string, if present
else: else:
message = "Unknown extraction error." message = "Unknown extraction error."
if "is not a valid URL." in message:
message = "Not a valid video ID."
result = { result = {
"error": message "error": message
} }