]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/ro220.py
1 from __future__
import unicode_literals
5 from .common
import InfoExtractor
12 class Ro220IE(InfoExtractor
):
14 _VALID_URL
= r
'(?x)(?:https?://)?(?:www\.)?220\.ro/(?P<category>[^/]+)/(?P<shorttitle>[^/]+)/(?P<video_id>[^/]+)'
16 "url": "http://www.220.ro/sport/Luati-Le-Banii-Sez-4-Ep-1/LYV6doKo7f/",
17 'file': 'LYV6doKo7f.mp4',
18 'md5': '03af18b73a07b4088753930db7a34add',
20 "title": "Luati-le Banii sez 4 ep 1",
21 "description": "re:^Iata-ne reveniti dupa o binemeritata vacanta\. +Va astept si pe Facebook cu pareri si comentarii.$",
25 def _real_extract(self
, url
):
26 mobj
= re
.match(self
._VALID
_URL
, url
)
27 video_id
= mobj
.group('video_id')
29 webpage
= self
._download
_webpage
(url
, video_id
)
30 flashVars_str
= self
._search
_regex
(
31 r
'<param name="flashVars" value="([^"]+)"',
33 flashVars
= compat_parse_qs(flashVars_str
)
39 'url': flashVars
['videoURL'][0],
40 'title': flashVars
['title'][0],
41 'description': clean_html(flashVars
['desc'][0]),
42 'thumbnail': flashVars
['preview'][0],