2 from __future__ import unicode_literals
7 from .anvato import AnvatoIE
8 from .sendtonews import SendtoNewsIE
9 from ..compat import compat_urlparse
12 class CBSLocalIE(AnvatoIE):
13 _VALID_URL = r'https?://[a-z]+\.cbslocal\.com/\d+/\d+/\d+/(?P<id>[0-9a-z-]+)'
17 'url': 'http://losangeles.cbslocal.com/2016/05/16/safety-advocates-say-fatal-car-seat-failures-are-public-health-crisis',
18 'md5': 'f0ee3081e3843f575fccef901199b212',
22 'title': 'Safety Advocates Say Fatal Car Seat Failures Are \'Public Health Crisis\'',
23 '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.',
24 'thumbnail': 're:^https?://.*',
25 'timestamp': 1463440500,
26 'upload_date': '20160516',
31 'Stations\\Spoken Word\\KCBSTV',
36 'Syndication\\Tribune',
37 'Syndication\\Curb.tv',
43 'url': 'http://cleveland.cbslocal.com/2016/05/16/indians-score-season-high-15-runs-in-blowout-win-over-reds-rapid-reaction/',
45 'id': 'GxfCe0Zo7D-175909-5588',
47 'title': 'Recap: CLE 15, CIN 6',
48 'description': '5/16/16: Indians\' bats explode for 15 runs in a win',
49 'upload_date': '20160516',
50 'timestamp': 1463433840,
55 'skip_download': True,
59 def _real_extract(self, url):
60 display_id = self._match_id(url)
61 webpage = self._download_webpage(url, display_id)
63 sendtonews_url = SendtoNewsIE._extract_url(webpage)
66 '_type': 'url_transparent',
67 'url': compat_urlparse.urljoin(url, sendtonews_url),
70 info_dict = self._extract_anvato_videos(webpage, display_id)
72 time_str = self._html_search_regex(
73 r'class="entry-date">([^<]+)<', webpage, 'released date', fatal=False)
76 timestamp = calendar.timegm(datetime.datetime.strptime(
77 time_str, '%b %d, %Y %I:%M %p').timetuple())
80 'display_id': display_id,
81 'timestamp': timestamp,