mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-23 00:16:48 +00:00
Update youtube_dl/extractor/twitter.py
Co-authored-by: dirkf <fieldhouse@gmx.net>
This commit is contained in:
parent
c1c8791335
commit
9b6e3940a7
@ -466,7 +466,12 @@ class TwitterIE(TwitterBaseIE):
|
||||
# Keep the file name short so it doesn't exceed filesystem limits
|
||||
title = description
|
||||
if len(title) > 40:
|
||||
title = title[:35] + "[...]"
|
||||
trim = 35
|
||||
# allow up to 10 more characters to find whitespace
|
||||
m = re.search(r'\s+', title, trim, trim + 10)
|
||||
if m:
|
||||
trim = m.start() + 1
|
||||
title = title[:trim] + '...'
|
||||
if uploader:
|
||||
title = '%s - %s' % (uploader, title)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user