]>
 
 
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/ehow.py 
 
 
 
 
 
 
 
 
   1  from  __future__ 
import  unicode_literals
 
   6  from  . common 
import  InfoExtractor
 
   9  class  EHowIE ( InfoExtractor
):  
  11      _VALID_URL 
=  r
'https?://(?:www\.)?ehow\.com/[^/_?]*_(?P<id>[0-9]+)'  
  13          'url' :  'http://www.ehow.com/video_12245069_hardwood-flooring-basics.html' ,  
  14          'md5' :  '9809b4e3f115ae2088440bcb4efbf371' ,  
  18              'title' :  'Hardwood Flooring Basics' ,  
  19              'description' :  '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              'uploader' :  'Erick Nathan' ,  
  24      def  _real_extract ( self
,  url
):  
  25          video_id 
=  self
._ match
_ id
( url
)  
  26          webpage 
=  self
._ download
_ webpage
( url
,  video_id
)  
  27          video_url 
=  self
._ search
_ regex
(  
  28              r
'(?:file|source)=(http[^\' "&]*)', webpage, 'video URL')  
  29          final_url = compat_urllib_parse.unquote(video_url)  
  30          uploader = self._html_search_meta('uploader', webpage)  
  31          title = self._og_search_title(webpage).replace(' | eHow', '')  
  37              'thumbnail': self._og_search_thumbnail(webpage),  
  38              'description': self._og_search_description(webpage),