diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py index 17b576df3..917dd7240 100644 --- a/youtube_dl/extractor/extractors.py +++ b/youtube_dl/extractor/extractors.py @@ -708,6 +708,7 @@ from .newgrounds import ( NewgroundsIE, NewgroundsPlaylistIE, ) +from .news18 import News18IE from .newstube import NewstubeIE from .nextmedia import ( NextMediaIE, diff --git a/youtube_dl/extractor/news18.py b/youtube_dl/extractor/news18.py new file mode 100644 index 000000000..0f0e3b94e --- /dev/null +++ b/youtube_dl/extractor/news18.py @@ -0,0 +1,23 @@ +from __future__ import unicode_literals + +import re + +from .common import InfoExtractor + +class News18IE(InfoExtractor): + _VALID_URL = r'''https?:\/\/www\.news18\.com[a-zA-Z0-9_\/-]+-(?P\d+)\.html''' + + def _real_extract(self, url): + IE_NAME = 'News18' + video_id = self._match_id(url) + webpage = self._download_webpage(url,video_id) + video_url = self._search_regex(r'(?Phttps?:\/\/vodpd\.news18\.com[\/\w_-]+\.mp4)', webpage, 'video URL',default='') + title = self._og_search_title(webpage) + + return { + 'url': video_url, + 'id': video_id, + 'title': title, + 'ext': '.mp4' + } +