mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-13 14:37:43 +01:00
[rutube] Use bool_or_none
This commit is contained in:
parent
c7e327c4d4
commit
c3dd44e085
@ -12,9 +12,10 @@
|
|||||||
)
|
)
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
determine_ext,
|
determine_ext,
|
||||||
unified_timestamp,
|
bool_or_none,
|
||||||
try_get,
|
|
||||||
int_or_none,
|
int_or_none,
|
||||||
|
try_get,
|
||||||
|
unified_timestamp,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -42,7 +43,7 @@ def _extract_video(self, video, video_id=None, require_title=True):
|
|||||||
'age_limit': age_limit,
|
'age_limit': age_limit,
|
||||||
'view_count': int_or_none(video.get('hits')),
|
'view_count': int_or_none(video.get('hits')),
|
||||||
'comment_count': int_or_none(video.get('comments_count')),
|
'comment_count': int_or_none(video.get('comments_count')),
|
||||||
'is_live': video.get('is_livestream'),
|
'is_live': bool_or_none(video.get('is_livestream')),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user