]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/normalboots.py
2 from __future__
import unicode_literals
6 from . common
import InfoExtractor
13 class NormalbootsIE ( InfoExtractor
):
14 _VALID_URL
= r
'http://(?:www\.)?normalboots\.com/video/(?P<videoid>[0-9a-z-]*)/?$'
16 'url' : 'http://normalboots.com/video/home-alone-games-jontron/' ,
17 'md5' : '8bf6de238915dd501105b44ef5f1e0f6' ,
19 'id' : 'home-alone-games-jontron' ,
21 'title' : 'Home Alone Games - JonTron - NormalBoots' ,
22 'description' : 'Jon is late for Christmas. Typical. Thanks to: Paul Ritchey for Co-Writing/Filming: http://www.youtube.com/user/ContinueShow Michael Azzi for Christmas Intro Animation: http://michafrar.tumblr.com/ Jerrod Waters for Christmas Intro Music: http://www.youtube.com/user/xXJerryTerryXx Casey Ormond for ‘Tense Battle Theme’: \xa0 http://www.youtube.com/Kiamet/' ,
23 'uploader' : 'JonTron' ,
24 'upload_date' : '20140125' ,
28 def _real_extract ( self
, url
):
29 mobj
= re
. match ( self
._ VALID
_U RL
, url
)
30 video_id
= mobj
. group ( 'videoid' )
32 webpage
= self
._ download
_ webpage
( url
, video_id
)
33 video_uploader
= self
._ html
_ search
_ regex
( r
'Posted\sby\s<a\shref="[A-Za-z0-9/]*">(?P<uploader>[A-Za-z]*)\s</a>' ,
35 raw_upload_date
= self
._ html
_ search
_ regex
( '<span style="text-transform:uppercase; font-size:inherit;">[A-Za-z]+, (?P<date>.*)</span>' ,
37 video_upload_date
= unified_strdate ( raw_upload_date
)
39 player_url
= self
._ html
_ search
_ regex
( r
'<iframe\swidth="[0-9]+"\sheight="[0-9]+"\ssrc="(?P<url>[\S]+)"' , webpage
, 'url' )
40 player_page
= self
._ download
_ webpage
( player_url
, video_id
)
41 video_url
= self
._ html
_ search
_ regex
( r
"file:\s'(?P<file>[^']+\.mp4)'" , player_page
, 'file' )
46 'title' : self
._ og
_ search
_ title
( webpage
),
47 'description' : self
._ og
_ search
_ description
( webpage
),
48 'thumbnail' : self
._ og
_ search
_ thumbnail
( webpage
),
49 'uploader' : video_uploader
,
50 'upload_date' : video_upload_date
,