]>
 
 
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/behindkink.py 
 
 
 
 
 
 
 
 
   2  from  __future__ 
import  unicode_literals
 
   6  from  . common 
import  InfoExtractor
 
   7  from  .. utils 
import  url_basename
 
  10  class  BehindKinkIE ( InfoExtractor
):  
  11      _VALID_URL 
=  r
'http://(?:www\.)?behindkink\.com/(?P<year>[0-9] {4} )/(?P<month>[0-9] {2} )/(?P<day>[0-9] {2} )/(?P<id>[^/#?_]+)'  
  13          'url' :  'http://www.behindkink.com/2014/08/14/ab1576-performers-voice-finally-heard-the-bill-is-killed/' ,  
  14          'md5' :  '41ad01222b8442089a55528fec43ec01' ,  
  18              'title' :  'AB1576 - PERFORMERS VOICE FINALLY HEARD - THE BILL IS KILLED!' ,  
  19              'description' :  'The adult industry voice was finally heard as Assembly Bill 1576 remained \xa0  in suspense today at the Senate Appropriations Hearing. AB1576 was, among other industry damaging issues, a condom mandate...' ,  
  20              'upload_date' :  '20140814' ,  
  21              'thumbnail' :  'http://www.behindkink.com/wp-content/uploads/2014/08/36370_AB1576_Win.jpg' ,  
  26      def  _real_extract ( self
,  url
):  
  27          mobj 
=  re
. match ( self
._ VALID
_U RL
,  url
)  
  28          display_id 
=  mobj
. group ( 'id' )  
  29          year 
=  mobj
. group ( 'year' )  
  30          month 
=  mobj
. group ( 'month' )  
  31          day 
=  mobj
. group ( 'day' )  
  32          upload_date 
=  year 
+  month 
+  day
 
  34          webpage 
=  self
._ download
_ webpage
( url
,  display_id
)  
  36          video_url 
=  self
._ search
_ regex
(  
  37              r
"'file':\s*'([^']+)'" ,  
  40          video_id 
=  url_basename ( video_url
)  
  41          video_id 
=  video_id
. split ( '_' )[ 0 ]  
  47              'title' :  self
._ og
_ search
_ title
( webpage
),  
  48              'display_id' :  display_id
,  
  49              'thumbnail' :  self
._ og
_ search
_ thumbnail
( webpage
),  
  50              'description' :  self
._ og
_ search
_ description
( webpage
),  
  51              'upload_date' :  upload_date
,