1
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-03-09 12:50:23 -05:00

truncate tile

This commit is contained in:
4ft35t 2025-02-23 10:38:38 +08:00
parent 4156962abe
commit 28c22b1838

View file

@ -15,6 +15,7 @@
url_or_none,
urlencode_postdata,
urljoin,
truncate_string
)
@ -106,7 +107,7 @@ def _parse_video_info(self, video_info, video_id=None):
**traverse_obj(video_info, {
'id': (('id', 'id_str', 'mid'), {str_or_none}),
'display_id': ('mblogid', {str_or_none}),
'title': ('page_info', 'media_info', ('video_title', 'name', 'kol_title'), {str}, filter),
'title': ('page_info', 'media_info', ('video_title', 'kol_title', 'name'), {lambda x: x.replace('\n', ' ')}, {truncate_string(left=50)}, {str}, filter),
'description': ('text_raw', {str}),
'duration': ('page_info', 'media_info', 'duration', {int_or_none}),
'timestamp': ('page_info', 'media_info', 'video_publish_time', {int_or_none}),