2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
11 class NormalbootsIE(InfoExtractor
):
12 _VALID_URL
= r
'http://(?:www\.)?normalboots\.com/video/(?P<id>[0-9a-z-]*)/?$'
14 'url': 'http://normalboots.com/video/home-alone-games-jontron/',
15 'md5': '8bf6de238915dd501105b44ef5f1e0f6',
17 'id': 'home-alone-games-jontron',
19 'title': 'Home Alone Games - JonTron - NormalBoots',
20 '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’:\xa0http://www.youtube.com/Kiamet/',
21 'uploader': 'JonTron',
22 'upload_date': '20140125',
26 'skip_download': True,
30 def _real_extract(self
, url
):
31 video_id
= self
._match
_id
(url
)
32 webpage
= self
._download
_webpage
(url
, video_id
)
34 video_uploader
= self
._html
_search
_regex
(
35 r
'Posted\sby\s<a\shref="[A-Za-z0-9/]*">(?P<uploader>[A-Za-z]*)\s</a>',
36 webpage
, 'uploader', fatal
=False)
37 video_upload_date
= unified_strdate(self
._html
_search
_regex
(
38 r
'<span style="text-transform:uppercase; font-size:inherit;">[A-Za-z]+, (?P<date>.*)</span>',
39 webpage
, 'date', fatal
=False))
41 player_url
= self
._html
_search
_regex
(
42 r
'<iframe\swidth="[0-9]+"\sheight="[0-9]+"\ssrc="(?P<url>[\S]+)"',
43 webpage
, 'player url')
44 player_page
= self
._download
_webpage
(player_url
, video_id
)
45 video_url
= self
._html
_search
_regex
(
46 r
"file:\s'(?P<file>[^']+\.mp4)'", player_page
, 'file')
51 'title': self
._og
_search
_title
(webpage
),
52 'description': self
._og
_search
_description
(webpage
),
53 'thumbnail': self
._og
_search
_thumbnail
(webpage
),
54 'uploader': video_uploader
,
55 'upload_date': video_upload_date
,