]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/normalboots.py
3 from . common
import InfoExtractor
10 class NormalbootsIE ( InfoExtractor
):
11 _VALID_URL
= r
'(?:http://)?(?:www\.)?normalboots\.com/video/(?P<videoid>[0-9a-z-]*)/?$'
13 u
'url' : u
'http://normalboots.com/video/home-alone-games-jontron/' ,
14 u
'file' : u
'home-alone-games-jontron.mp4' ,
15 u
'md5' : u
'8bf6de238915dd501105b44ef5f1e0f6' ,
17 u
'title' : u
'Home Alone Games - JonTron - NormalBoots' ,
18 u
'description' : u
'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 \u2018Tense Battle Theme\u2019: \xa0 http://www.youtube.com/Kiamet/' ,
19 u
'uploader' : u
'JonTron' ,
20 u
'upload_date' : u
'20140125' ,
24 def _real_extract ( self
, url
):
25 mobj
= re
. match ( self
._ VALID
_U RL
, url
)
27 raise ExtractorError ( u
'Invalid URL: %s ' % url
)
28 video_id
= mobj
. group ( 'videoid' )
39 webpage
= self
._ download
_ webpage
( url
, video_id
)
40 video_title
= self
._ og
_ search
_ title
( webpage
)
41 video_description
= self
._ og
_ search
_ description
( webpage
)
42 video_thumbnail
= self
._ og
_ search
_ thumbnail
( webpage
)
43 video_uploader
= self
._ html
_ search
_ regex
( r
'Posted\sby\s<a\shref="[A-Za-z0-9/]*">(?P<uploader>[A-Za-z]*)\s</a>' ,
45 raw_upload_date
= self
._ html
_ search
_ regex
( '<span style="text-transform:uppercase; font-size:inherit;">[A-Za-z]+, (?P<date>.*)</span>' ,
47 video_upload_date
= unified_strdate ( raw_upload_date
)
48 video_upload_date
= unified_strdate ( raw_upload_date
)
50 player_url
= self
._ html
_ search
_ regex
( r
'<iframe\swidth="[0-9]+"\sheight="[0-9]+"\ssrc="(?P<url>[\S]+)"' , webpage
, 'url' )
51 player_page
= self
._ download
_ webpage
( player_url
, video_id
)
52 video_url
= u
'http://player.screenwavemedia.com/' + self
._ html
_ search
_ regex
( r
"'file':\s'(?P<file>[0-9A-Za-z-_\.]+)'" , player_page
, 'file' )
54 info
[ 'url' ] = video_url
55 info
[ 'title' ] = video_title
56 info
[ 'description' ] = video_description
57 info
[ 'thumbnail' ] = video_thumbnail
58 info
[ 'uploader' ] = video_uploader
59 info
[ 'upload_date' ] = video_upload_date