]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/ehow.py
7 from . common
import InfoExtractor
10 class EHowIE ( InfoExtractor
):
12 _VALID_URL
= r
'(?:https?://)?(?:www\.)?ehow\.com/[^/_?]*_(?P<id>[0-9]+)'
14 u
'url' : u
'http://www.ehow.com/video_12245069_hardwood-flooring-basics.html' ,
15 u
'file' : u
'12245069.flv' ,
16 u
'md5' : u
'9809b4e3f115ae2088440bcb4efbf371' ,
18 u
"title" : u
"Hardwood Flooring Basics" ,
19 u
"description" : u
"Hardwood flooring may be time consuming, but its ultimately a pretty straightforward concept. Learn about hardwood flooring basics with help from a hardware flooring business owner in this free video..." ,
20 u
"uploader" : u
"Erick Nathan"
24 def _real_extract ( self
, url
):
25 mobj
= re
. match ( self
._ VALID
_U RL
, url
)
26 video_id
= mobj
. group ( 'id' )
27 webpage
= self
._ download
_ webpage
( url
, video_id
)
28 video_url
= self
._ search
_ regex
( r
'(?:file|source)=(http[^\' "&]*)',
29 webpage, u'video URL')
30 final_url = compat_urllib_parse.unquote(video_url)
31 uploader = self._search_regex(r'<meta name=" uploader
" content=" (.+ ?
) " />',
33 title = self._og_search_title(webpage).replace(' | eHow', '')
34 ext = determine_ext(final_url)
42 'thumbnail': self._og_search_thumbnail(webpage),
43 'description': self._og_search_description(webpage),