]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/cbslocal.py
4bcd104af7463b1cc4b9c6c88673cafc9ad655e7
2 from __future__
import unicode_literals
4 from . anvato
import AnvatoIE
5 from . sendtonews
import SendtoNewsIE
6 from .. compat
import compat_urlparse
7 from .. utils
import unified_timestamp
10 class CBSLocalIE ( AnvatoIE
):
11 _VALID_URL
= r
'https?://[a-z]+\.cbslocal\.com/\d+/\d+/\d+/(?P<id>[0-9a-z-]+)'
15 'url' : 'http://losangeles.cbslocal.com/2016/05/16/safety-advocates-say-fatal-car-seat-failures-are-public-health-crisis' ,
16 'md5' : 'f0ee3081e3843f575fccef901199b212' ,
20 'title' : 'Safety Advocates Say Fatal Car Seat Failures Are \' Public Health Crisis \' ' ,
21 '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.' ,
22 'thumbnail' : 're:^https?://.*' ,
23 'timestamp' : 1463440500 ,
24 'upload_date' : '20160516' ,
29 'Stations \\ Spoken Word \\ KCBSTV' ,
34 'Syndication \\ Tribune' ,
35 'Syndication \\ Curb.tv' ,
41 'url' : 'http://cleveland.cbslocal.com/2016/05/16/indians-score-season-high-15-runs-in-blowout-win-over-reds-rapid-reaction/' ,
43 'id' : 'GxfCe0Zo7D-175909-5588' ,
48 'skip_download' : True ,
52 def _real_extract ( self
, url
):
53 display_id
= self
._ match
_ id
( url
)
54 webpage
= self
._ download
_ webpage
( url
, display_id
)
56 sendtonews_url
= SendtoNewsIE
._ extract
_u rl
( webpage
)
58 return self
. url_result (
59 compat_urlparse
. urljoin ( url
, sendtonews_url
),
60 ie
= SendtoNewsIE
. ie_key ())
62 info_dict
= self
._ extract
_ anvato
_ videos
( webpage
, display_id
)
64 time_str
= self
._ html
_ search
_ regex
(
65 r
'class="entry-date">([^<]+)<' , webpage
, 'released date' , fatal
= False )
66 timestamp
= unified_timestamp ( time_str
)
69 'display_id' : display_id
,
70 'timestamp' : timestamp
,