mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-26 04:02:11 +00:00
Update youtube_dl/extractor/twitter.py
Co-authored-by: dirkf <fieldhouse@gmx.net>
This commit is contained in:
parent
c1c8791335
commit
9b6e3940a7
1 changed files with 6 additions and 1 deletions
|
@ -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 a new issue