1 from __future__ import unicode_literals
3 from .common import InfoExtractor
11 class NDTVIE(InfoExtractor):
12 _VALID_URL = r'https?://(?:www\.)?ndtv\.com/video/(?:[^/]+/)+[^/?^&]+-(?P<id>\d+)'
15 'url': 'http://www.ndtv.com/video/news/news/ndtv-exclusive-don-t-need-character-certificate-from-rahul-gandhi-says-arvind-kejriwal-300710',
16 'md5': '39f992dbe5fb531c395d8bbedb1e5e88',
20 'title': "NDTV exclusive: Don't need character certificate from Rahul Gandhi, says Arvind Kejriwal",
21 'description': 'md5:ab2d4b4a6056c5cb4caa6d729deabf02',
22 'upload_date': '20131208',
24 'thumbnail': 're:https?://.*\.jpg',
28 def _real_extract(self, url):
29 video_id = self._match_id(url)
30 webpage = self._download_webpage(url, video_id)
32 title = remove_end(self._og_search_title(webpage), ' - NDTV')
34 filename = self._search_regex(
35 r"__filename='([^']+)'", webpage, 'video filename')
36 video_url = 'http://bitcast-b.bitgravity.com/ndtvod/23372/ndtv/%s' % filename
38 duration = int_or_none(self._search_regex(
39 r"__duration='([^']+)'", webpage, 'duration', fatal=False))
41 upload_date = unified_strdate(self._html_search_meta(
42 'publish-date', webpage, 'upload date', fatal=False))
44 description = remove_end(self._og_search_description(webpage), ' (Read more)')
50 'description': description,
51 'thumbnail': self._og_search_thumbnail(webpage),
53 'upload_date': upload_date,