]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/teamfourstar.py
a8c6ed7beb25b49eb6dde31c892b74ca46ca3296
   2 from __future__ 
import unicode_literals
 
   4 from .common 
import InfoExtractor
 
   5 from .jwplatform 
import JWPlatformIE
 
   6 from ..utils 
import unified_strdate
 
   9 class TeamFourStarIE(InfoExtractor
): 
  10     _VALID_URL 
= r
'https?://(?:www\.)?teamfourstar\.com/(?P<id>[a-z0-9\-]+)' 
  12         'url': 'http://teamfourstar.com/tfs-abridged-parody-episode-1-2/', 
  15             'title': 'TFS Abridged Parody Episode 1', 
  16             'description': 'md5:d60bc389588ebab2ee7ad432bda953ae', 
  18             'timestamp': 1394168400, 
  19             'upload_date': '20080508', 
  23     def _real_extract(self
, url
): 
  24         display_id 
= self
._match
_id
(url
) 
  25         webpage 
= self
._download
_webpage
(url
, display_id
) 
  27         jwplatform_url 
= JWPlatformIE
._extract
_url
(webpage
) 
  29         video_title 
= self
._html
_search
_regex
( 
  30             r
'<h1[^>]+class="entry-title"[^>]*>(?P<title>.+?)</h1>', 
  32         video_date 
= unified_strdate(self
._html
_search
_regex
( 
  33             r
'<span[^>]+class="meta-date date updated"[^>]*>(?P<date>.+?)</span>', 
  34             webpage
, 'date', fatal
=False)) 
  35         video_description 
= self
._html
_search
_regex
( 
  36             r
'(?s)<div[^>]+class="content-inner"[^>]*>.*?(?P<description><p>.+?)</div>', 
  37             webpage
, 'description', fatal
=False) 
  38         video_thumbnail 
= self
._og
_search
_thumbnail
(webpage
) 
  41             '_type': 'url_transparent', 
  42             'display_id': display_id
, 
  44             'description': video_description
, 
  45             'upload_date': video_date
, 
  46             'thumbnail': video_thumbnail
, 
  47             'url': jwplatform_url
,