Browse Source

[jwplatform:base] Extract duration

totalwebcasting
Sergey M․ 9 years ago
parent
commit
a6d6722c8f
No known key found for this signature in database GPG Key ID: 2C393E0F18A9236D
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      youtube_dl/extractor/jwplatform.py

+ 5
- 1
youtube_dl/extractor/jwplatform.py View File

@ -4,7 +4,10 @@ from __future__ import unicode_literals
import re import re
from .common import InfoExtractor from .common import InfoExtractor
from ..utils import int_or_none
from ..utils import (
float_or_none,
int_or_none,
)
class JWPlatformBaseIE(InfoExtractor): class JWPlatformBaseIE(InfoExtractor):
@ -41,6 +44,7 @@ class JWPlatformBaseIE(InfoExtractor):
'description': video_data.get('description'), 'description': video_data.get('description'),
'thumbnail': self._proto_relative_url(video_data.get('image')), 'thumbnail': self._proto_relative_url(video_data.get('image')),
'timestamp': int_or_none(video_data.get('pubdate')), 'timestamp': int_or_none(video_data.get('pubdate')),
'duration': float_or_none(jwplayer_data.get('duration')),
'subtitles': subtitles, 'subtitles': subtitles,
'formats': formats, 'formats': formats,
} }


Loading…
Cancel
Save