mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2025-02-17 09:27:54 +01:00
[makotv] Use int_or_none
This commit is contained in:
parent
577eb9ced4
commit
a5b4bf097f
@ -7,6 +7,7 @@ from ..utils import (
|
||||
ExtractorError,
|
||||
urljoin,
|
||||
parse_duration,
|
||||
int_or_none,
|
||||
)
|
||||
|
||||
|
||||
@ -107,11 +108,8 @@ class MakoTVIE(InfoExtractor):
|
||||
'view_count': video_details['numViews'],
|
||||
'average_rating': video_details['rank'],
|
||||
'episode': video_details['title'],
|
||||
'episode_number': int_or_none(video_details['episodeNumber']),
|
||||
'season': video_details['season'],
|
||||
})
|
||||
try:
|
||||
info.update({'episode_number': int(video_details['episodeNumber'])})
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
return info
|
||||
|
Loading…
Reference in New Issue
Block a user