mirror of
https://git.sr.ht/~cadence/NewLeaf
synced 2024-11-14 03:57:31 +00:00
Add a handler for ytdl search request message
This commit is contained in:
parent
e3595a455e
commit
50a4b7af45
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user