]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/cbslocal.py
2 from __future__
import unicode_literals
4 from . anvato
import AnvatoIE
5 from . sendtonews
import SendtoNewsIE
6 from .. compat
import compat_urlparse
13 class CBSLocalIE ( AnvatoIE
):
14 _VALID_URL
= r
'https?://[a-z]+\.cbslocal\.com/(?:\d+/\d+/\d+|video)/(?P<id>[0-9a-z-]+)'
18 'url' : 'http://losangeles.cbslocal.com/2016/05/16/safety-advocates-say-fatal-car-seat-failures-are-public-health-crisis' ,
19 'md5' : 'f0ee3081e3843f575fccef901199b212' ,
23 'title' : 'Safety Advocates Say Fatal Car Seat Failures Are \' Public Health Crisis \' ' ,
24 'description' : 'Collapsing seats have been the focus of scrutiny for decades, though experts say remarkably little has been done to address the issue. Randy Paige reports.' ,
25 'thumbnail' : 're:^https?://.*' ,
26 'timestamp' : 1463440500 ,
27 'upload_date' : '20160516' ,
33 'Stations \\ Spoken Word \\ KCBSTV' ,
38 'Syndication \\ Tribune' ,
39 'Syndication \\ Curb.tv' ,
42 'tags' : [ 'CBS 2 News Evening' ],
46 'url' : 'http://cleveland.cbslocal.com/2016/05/16/indians-score-season-high-15-runs-in-blowout-win-over-reds-rapid-reaction/' ,
48 'id' : 'GxfCe0Zo7D-175909-5588' ,
53 'skip_download' : True ,
56 'url' : 'http://newyork.cbslocal.com/video/3580809-a-very-blue-anniversary/' ,
60 'title' : 'A Very Blue Anniversary' ,
61 'description' : 'CBS2’s Cindy Hsu has more.' ,
62 'thumbnail' : 're:^https?://.*' ,
64 'upload_date' : r
're:^\d {8} $' ,
70 'Stations \\ Spoken Word \\ WCBSTV' ,
76 'Content \\ News \\ Local News' ,
78 'tags' : [ 'CBS 2 News Weekends' , 'Cindy Hsu' , 'Blue Man Group' ],
82 def _real_extract ( self
, url
):
83 display_id
= self
._ match
_ id
( url
)
84 webpage
= self
._ download
_ webpage
( url
, display_id
)
86 sendtonews_url
= SendtoNewsIE
._ extract
_u rl
( webpage
)
88 return self
. url_result (
89 compat_urlparse
. urljoin ( url
, sendtonews_url
),
90 ie
= SendtoNewsIE
. ie_key ())
92 info_dict
= self
._ extract
_ anvato
_ videos
( webpage
, display_id
)
94 timestamp
= unified_timestamp ( self
._ html
_ search
_ regex
(
95 r
'class="(?:entry|post)-date"[^>]*>([^<]+)' , webpage
,
96 'released date' , default
= None )) or parse_iso8601 (
97 self
._ html
_ search
_ meta
( 'uploadDate' , webpage
))
100 'display_id' : display_id
,
101 'timestamp' : timestamp
,