mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-03 23:25:06 +00:00
[VideoTt] fix ValueError (#3161)
This commit is contained in:
parent
ba7aa464de
commit
d410fee91d
1 changed files with 8 additions and 5 deletions
|
@ -4,7 +4,10 @@
|
||||||
import base64
|
import base64
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import unified_strdate
|
from ..utils import (
|
||||||
|
unified_strdate,
|
||||||
|
int_or_none,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class VideoTtIE(InfoExtractor):
|
class VideoTtIE(InfoExtractor):
|
||||||
|
@ -50,9 +53,9 @@ def _real_extract(self, url):
|
||||||
'thumbnail': settings['config']['thumbnail'],
|
'thumbnail': settings['config']['thumbnail'],
|
||||||
'upload_date': unified_strdate(video['added']),
|
'upload_date': unified_strdate(video['added']),
|
||||||
'uploader': video['owner'],
|
'uploader': video['owner'],
|
||||||
'view_count': int(video['view_count']),
|
'view_count': int_or_none(video['view_count']),
|
||||||
'comment_count': int(video['comment_count']),
|
'comment_count': None if video.get('comment_count') == '--' else int_or_none(video['comment_count']),
|
||||||
'like_count': int(video['liked']),
|
'like_count': int_or_none(video['liked']),
|
||||||
'dislike_count': int(video['disliked']),
|
'dislike_count': int_or_none(video['disliked']),
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
}
|
}
|
Loading…
Reference in a new issue