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',
45 'title': 'Recap: CLE 15, CIN 6',
46 'description': '5/16/16: Indians\' bats explode for 15 runs in a win',
47 'upload_date': '20160516',
48 'timestamp': 1463433840,
53 'skip_download': True,
57 def _real_extract(self, url):
58 display_id = self._match_id(url)
59 webpage = self._download_webpage(url, display_id)
61 sendtonews_url = SendtoNewsIE._extract_url(webpage)
64 '_type': 'url_transparent',
65 'url': compat_urlparse.urljoin(url, sendtonews_url),
68 info_dict = self._extract_anvato_videos(webpage, display_id)
70 time_str = self._html_search_regex(
71 r'class="entry-date">([^<]+)<', webpage, 'released date', fatal=False)
72 timestamp = unified_timestamp(time_str)
75 'display_id': display_id,
76 'timestamp': timestamp,