]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/jwplatform.py
63d0dc998cf1cf281dda3c27f3afaae84f4906c9
2 from __future__
import unicode_literals
6 from .common
import InfoExtractor
9 class JWPlatformIE(InfoExtractor
):
10 _VALID_URL
= r
'(?:https?://content\.jwplatform\.com/(?:feeds|players|jw6)/|jwplatform:)(?P<id>[a-zA-Z0-9]{8})'
12 'url': 'http://content.jwplatform.com/players/nPripu9l-ALJ3XQCI.js',
13 'md5': 'fa8899fa601eb7c83a64e9d568bdf325',
17 'title': 'Big Buck Bunny Trailer',
18 'description': 'Big Buck Bunny is a short animated film by the Blender Institute. It is made using free and open source software.',
19 'upload_date': '20081127',
20 'timestamp': 1227796140,
25 def _extract_url(webpage
):
26 urls
= JWPlatformIE
._extract
_urls
(webpage
)
27 return urls
[0] if urls
else None
30 def _extract_urls(webpage
):
32 r
'<(?:script|iframe)[^>]+?src=["\']((?
:https?
:)?
//content\
.jwplatform\
.com
/players
/[a
-zA
-Z0
-9]{8}
)',
35 def _real_extract(self, url):
36 video_id = self._match_id(url)
37 json_data = self._download_json('http
://content
.jwplatform
.com
/feeds
/%s.json
' % video_id, video_id)
38 return self._parse_jwplayer_data(json_data, video_id)