]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/jadorecettepub.py 
   3  from  __future__ 
import  unicode_literals
   7  from  . common 
import  InfoExtractor
   8  from  . youtube 
import  YoutubeIE
  11  class  JadoreCettePubIE ( InfoExtractor
):   12      _VALID_URL 
=  r
'http://(?:www\.)?jadorecettepub\.com/[0-9] {4} /[0-9] {2} /(?P<id>.*?)\.html'   15          'url' :  'http://www.jadorecettepub.com/2010/12/star-wars-massacre-par-les-japonais.html' ,   16          'md5' :  '401286a06067c70b44076044b66515de' ,   20              'title' :  'La pire utilisation de Star Wars' ,   21              'description' :  "Jadorecettepub.com vous a gratifié de plusieurs pubs géniales utilisant Star Wars et Dark Vador plus particulièrement... Mais l'heure est venue de vous proposer une version totalement massacrée, venue du Japon.  Quand les Japonais détruisent l'image de Star Wars pour vendre du thon en boite, ça promet..." ,   25      def  _real_extract ( self
,  url
):   26          mobj 
=  re
. match ( self
._ VALID
_U RL
,  url
)   27          display_id 
=  mobj
. group ( 'id' )   29          webpage 
=  self
._ download
_ webpage
( url
,  display_id
)   31          title 
=  self
._ html
_ search
_ regex
(   32              r
'<span style="font-size: x-large;"><b>(.*?)</b></span>' ,   34          description 
=  self
._ html
_ search
_ regex
(   35              r
'(?s)<div id="fb-root">(.*?)<script>' ,  webpage
,  'description' ,   37          real_url 
=  self
._ search
_ regex
(   38              r
'\[/postlink\](.*)endofvid' ,  webpage
,  'video URL' )   39          video_id 
=  YoutubeIE
. extract_id ( real_url
)   42              '_type' :  'url_transparent' ,   46              'description' :  description
,