From a5718b14a50774a71f09e6f884bc481941658a19 Mon Sep 17 00:00:00 2001 From: Carl Karsten Date: Mon, 5 Aug 2024 08:04:22 -0500 Subject: [PATCH] no <> in title, so use lean_description() to fix. --- dj/lib/youtube_v3_uploader.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dj/lib/youtube_v3_uploader.py b/dj/lib/youtube_v3_uploader.py index b49cd5a5..60cb5d83 100644 --- a/dj/lib/youtube_v3_uploader.py +++ b/dj/lib/youtube_v3_uploader.py @@ -178,7 +178,10 @@ def get_id_from_url(url): def clean_description(description): """ - The property value has a maximum length of 5000 bytes and may contain all valid UTF-8 characters except < and >. + Descriptin: The property value has a maximum length of 5000 bytes + and may contain all valid UTF-8 characters except < and >. + Same The video's title. The property value has a maximum length of 100 characters + and may contain all valid UTF-8 characters except < and >. https://developers.google.com/youtube/v3/docs/videos#properties """ @@ -405,6 +408,9 @@ def upload(self): print(self.pathname) pprint(self.meta) + self.meta['title'] = clean_description( + self.meta['title']) + self.meta['description'] = clean_description( self.meta['description'])