[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.
This commit is contained in:
Yen Chi Hsuan 2015-06-08 01:46:33 +08:00
parent edb99d4c18
commit e1ec93304d

View File

@ -3,7 +3,10 @@ from __future__ import unicode_literals
import re import re
from .common import InfoExtractor from .common import InfoExtractor
from ..utils import int_or_none from ..utils import (
int_or_none,
limit_length,
)
class InstagramIE(InfoExtractor): class InstagramIE(InfoExtractor):
@ -106,7 +109,7 @@ class InstagramUserIE(InfoExtractor):
entries.append({ entries.append({
'id': it['id'], 'id': it['id'],
'title': title, 'title': limit_length(title, 80),
'formats': formats, 'formats': formats,
'thumbnail': thumbnail, 'thumbnail': thumbnail,
'webpage_url': it.get('link'), 'webpage_url': it.get('link'),