]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/atttechchannel.py
1 from __future__
import unicode_literals
3 from .common
import InfoExtractor
4 from ..utils
import unified_strdate
7 class ATTTechChannelIE(InfoExtractor
):
8 _VALID_URL
= r
'https?://techchannel\.att\.com/play-video\.cfm/([^/]+/)*(?P<id>.+)'
10 'url': 'http://techchannel.att.com/play-video.cfm/2014/1/27/ATT-Archives-The-UNIX-System-Making-Computers-Easier-to-Use',
13 'display_id': 'ATT-Archives-The-UNIX-System-Making-Computers-Easier-to-Use',
15 'title': 'AT&T Archives : The UNIX System: Making Computers Easier to Use',
16 'description': 'A 1982 film about UNIX is the foundation for software in use around Bell Labs and AT&T.',
17 'thumbnail': 're:^https?://.*\.jpg$',
18 'upload_date': '20140127',
22 'skip_download': True,
26 def _real_extract(self
, url
):
27 display_id
= self
._match
_id
(url
)
29 webpage
= self
._download
_webpage
(url
, display_id
)
31 video_url
= self
._search
_regex
(
32 r
"url\s*:\s*'(rtmp://[^']+)'",
35 video_id
= self
._search
_regex
(
36 r
'mediaid\s*=\s*(\d+)',
37 webpage
, 'video id', fatal
=False)
39 title
= self
._og
_search
_title
(webpage
)
40 description
= self
._og
_search
_description
(webpage
)
41 thumbnail
= self
._og
_search
_thumbnail
(webpage
)
42 upload_date
= unified_strdate(self
._search
_regex
(
43 r
'[Rr]elease\s+date:\s*(\d{1,2}/\d{1,2}/\d{4})',
44 webpage
, 'upload date', fatal
=False), False)
48 'display_id': display_id
,
52 'description': description
,
53 'thumbnail': thumbnail
,
54 'upload_date': upload_date
,