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