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:
parent
4156962abe
commit
28c22b1838
1 changed files with 2 additions and 1 deletions
|
@ -15,6 +15,7 @@
|
||||||
url_or_none,
|
url_or_none,
|
||||||
urlencode_postdata,
|
urlencode_postdata,
|
||||||
urljoin,
|
urljoin,
|
||||||
|
truncate_string
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -106,7 +107,7 @@ def _parse_video_info(self, video_info, video_id=None):
|
||||||
**traverse_obj(video_info, {
|
**traverse_obj(video_info, {
|
||||||
'id': (('id', 'id_str', 'mid'), {str_or_none}),
|
'id': (('id', 'id_str', 'mid'), {str_or_none}),
|
||||||
'display_id': ('mblogid', {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}),
|
'description': ('text_raw', {str}),
|
||||||
'duration': ('page_info', 'media_info', 'duration', {int_or_none}),
|
'duration': ('page_info', 'media_info', 'duration', {int_or_none}),
|
||||||
'timestamp': ('page_info', 'media_info', 'video_publish_time', {int_or_none}),
|
'timestamp': ('page_info', 'media_info', 'video_publish_time', {int_or_none}),
|
||||||
|
|
Loading…
Reference in a new issue