Update twitter.py

This commit is contained in:
Ben Welsh 2022-08-10 05:27:46 -07:00 committed by GitHub
parent 9b6e3940a7
commit e84f0673bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -464,7 +464,7 @@ class TwitterIE(TwitterBaseIE):
timestamp = unified_timestamp(status.get('created_at'))
# Keep the file name short so it doesn't exceed filesystem limits
title = description
title = re.sub(r'\s+(https?://[^ ]+)', '', description)
if len(title) > 40:
trim = 35
# allow up to 10 more characters to find whitespace