mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[jwplatform:base] Extract duration
This commit is contained in:
parent
66fa495868
commit
a6d6722c8f
1 changed files with 5 additions and 1 deletions
|
@ -4,7 +4,10 @@
|
|||
import re
|
||||
|
||||
from .common import InfoExtractor
|
||||
from ..utils import int_or_none
|
||||
from ..utils import (
|
||||
float_or_none,
|
||||
int_or_none,
|
||||
)
|
||||
|
||||
|
||||
class JWPlatformBaseIE(InfoExtractor):
|
||||
|
@ -41,6 +44,7 @@ def _parse_jwplayer_data(self, jwplayer_data, video_id, require_title=True):
|
|||
'description': video_data.get('description'),
|
||||
'thumbnail': self._proto_relative_url(video_data.get('image')),
|
||||
'timestamp': int_or_none(video_data.get('pubdate')),
|
||||
'duration': float_or_none(jwplayer_data.get('duration')),
|
||||
'subtitles': subtitles,
|
||||
'formats': formats,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue