diff --git a/youtube_dl/extractor/twitch.py b/youtube_dl/extractor/twitch.py index 0db2dca41..95538b661 100644 --- a/youtube_dl/extractor/twitch.py +++ b/youtube_dl/extractor/twitch.py @@ -180,6 +180,8 @@ class TwitchItemBaseIE(TwitchBaseIE): def _extract_info(self, info): status = info.get('status') + # avoid filesystem's 255 bytes limit on filelength + title = info.get('title', '').encode()[:210].decode(errors='ignore') if status == 'recording': is_live = True elif status == 'recorded': @@ -188,7 +190,7 @@ class TwitchItemBaseIE(TwitchBaseIE): is_live = None return { 'id': info['_id'], - 'title': info.get('title') or 'Untitled Broadcast', + 'title': title or 'Untitled Broadcast', 'description': info.get('description'), 'duration': int_or_none(info.get('length')), 'thumbnail': info.get('preview'),