]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/wimp.py
3377a543ee7a93d59cd139389bb1c4c35b687277
1 from __future__
import unicode_literals
5 from .common
import InfoExtractor
6 from .youtube
import YoutubeIE
9 class WimpIE(InfoExtractor
):
10 _VALID_URL
= r
'http://(?:www\.)?wimp\.com/([^/]+)/'
12 'url': 'http://www.wimp.com/maruexhausted/',
13 'md5': 'f1acced123ecb28d9bb79f2479f2b6a1',
15 'id': 'maruexhausted',
17 'title': 'Maru is exhausted.',
18 'description': 'md5:57e099e857c0a4ea312542b684a869b8',
22 'url': 'http://www.wimp.com/clowncar/',
26 'title': 'Basset hound clown car...incredible!',
27 'description': 'md5:8d228485e0719898c017203f900b3a35',
28 'uploader': 'Gretchen Hoey',
29 'uploader_id': 'gretchenandjeff1',
30 'upload_date': '20140303',
32 'add_ie': ['Youtube'],
35 def _real_extract(self
, url
):
36 mobj
= re
.match(self
._VALID
_URL
, url
)
37 video_id
= mobj
.group(1)
38 webpage
= self
._download
_webpage
(url
, video_id
)
39 video_url
= self
._search
_regex
(
40 r
"'file'\s*:\s*'([^']+)'", webpage
, 'video URL')
41 if YoutubeIE
.suitable(video_url
):
42 self
.to_screen('Found YouTube video')
46 'ie_key': YoutubeIE
.ie_key(),
52 'title': self
._og
_search
_title
(webpage
),
53 'thumbnail': self
._og
_search
_thumbnail
(webpage
),
54 'description': self
._og
_search
_description
(webpage
),