]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/clipsyndicate.py
60644432105f472988a599638563079f4765b39d
1 from .common
import InfoExtractor
8 class ClipsyndicateIE(InfoExtractor
):
9 _VALID_URL
= r
'https?://(?:chic|www)\.clipsyndicate\.com/video/play(list/\d+)?/(?P<id>\d+)'
12 'url': 'http://www.clipsyndicate.com/video/play/4629301/brick_briscoe',
13 'md5': '4d7d549451bad625e0ff3d7bd56d776c',
17 'title': 'Brick Briscoe',
19 'thumbnail': r
're:^https?://.+\.jpg',
22 'url': 'http://chic.clipsyndicate.com/video/play/5844117/shark_attack',
23 'only_matching': True,
26 def _real_extract(self
, url
):
27 video_id
= self
._match
_id
(url
)
28 js_player
= self
._download
_webpage
(
29 'http://eplayer.clipsyndicate.com/embed/player.js?va_id=%s' % video_id
,
30 video_id
, 'Downlaoding player')
31 # it includes a required token
32 flvars
= self
._search
_regex
(r
'flvars: "(.*?)"', js_player
, 'flvars')
34 pdoc
= self
._download
_xml
(
35 'http://eplayer.clipsyndicate.com/osmf/playlist?%s' % flvars
,
36 video_id
, 'Downloading video info',
37 transform_source
=fix_xml_ampersands
)
39 track_doc
= pdoc
.find('trackList/track')
42 node
= find_xpath_attr(track_doc
, './/param', 'name', name
)
44 return node
.attrib
['value']
48 'title': find_param('title'),
49 'url': track_doc
.find('location').text
,
50 'thumbnail': find_param('thumbnail'),
51 'duration': int(find_param('duration')),