diff options
author | Yen Chi Hsuan <yan12125@gmail.com> | 2015-06-08 01:46:33 +0800 |
---|---|---|
committer | Yen Chi Hsuan <yan12125@gmail.com> | 2015-06-08 01:46:33 +0800 |
commit | e1ec93304dfcf385380feb95a3777c796cc49420 (patch) | |
tree | b523aa036df2a1dd3870a4f95168bf3632e7070d /youtube_dl/extractor | |
parent | edb99d4c18475ba27fae4f7d0ec6e3db9b574885 (diff) |
[instagram:user] Truncate title to 80 characters (#5919)
This is a workaround. Currently YoutubeDL.process_info() truncates
info_dict['title'] to 200 characters, but the implementation can't
handle wide characters.
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r-- | youtube_dl/extractor/instagram.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/youtube_dl/extractor/instagram.py b/youtube_dl/extractor/instagram.py index b92367a9d..3d78f78c4 100644 --- a/youtube_dl/extractor/instagram.py +++ b/youtube_dl/extractor/instagram.py @@ -3,7 +3,10 @@ from __future__ import unicode_literals import re from .common import InfoExtractor -from ..utils import int_or_none +from ..utils import ( + int_or_none, + limit_length, +) class InstagramIE(InfoExtractor): @@ -106,7 +109,7 @@ class InstagramUserIE(InfoExtractor): entries.append({ 'id': it['id'], - 'title': title, + 'title': limit_length(title, 80), 'formats': formats, 'thumbnail': thumbnail, 'webpage_url': it.get('link'), |