Skip to content

Commit

Permalink
no <> in title, so use lean_description() to fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlFK committed Aug 5, 2024
1 parent 5177187 commit a5718b1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dj/lib/youtube_v3_uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""

Expand Down Expand Up @@ -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'])

Expand Down

0 comments on commit a5718b1

Please sign in to comment.