mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2025-02-18 10:07:55 +01:00
Added extractor for News18.com
This commit is contained in:
parent
b99b0bcfa0
commit
45f72f2cd0
@ -708,6 +708,7 @@ from .newgrounds import (
|
||||
NewgroundsIE,
|
||||
NewgroundsPlaylistIE,
|
||||
)
|
||||
from .news18 import News18IE
|
||||
from .newstube import NewstubeIE
|
||||
from .nextmedia import (
|
||||
NextMediaIE,
|
||||
|
23
youtube_dl/extractor/news18.py
Normal file
23
youtube_dl/extractor/news18.py
Normal file
@ -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<id>\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'(?P<url>https?:\/\/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'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user