adding a valid_url for metrotvnews
This commit is contained in:
parent
908d8d2bcc
commit
3e863e3418
@ -490,7 +490,7 @@ from .ivi import (
|
||||
from .ivideon import IvideonIE
|
||||
from .iwara import IwaraIE
|
||||
|
||||
from .ixigua import IxiguaIE
|
||||
|
||||
from .izlesene import IzleseneIE
|
||||
from .jamendo import (
|
||||
JamendoIE,
|
||||
@ -618,6 +618,7 @@ from .melonvod import MelonVODIE
|
||||
from .meta import METAIE
|
||||
from .metacafe import MetacafeIE
|
||||
from .metacritic import MetacriticIE
|
||||
from .metrotvnews import MetrotvnewsIE
|
||||
from .mgoon import MgoonIE
|
||||
from .mgtv import MGTVIE
|
||||
from .miaopai import MiaoPaiIE
|
||||
|
@ -1,32 +0,0 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from .common import InfoExtractor
|
||||
|
||||
|
||||
|
||||
|
||||
class IxiguaIE(InfoExtractor):
|
||||
|
||||
_VALID_URL = r'https://www.ixigua.com/i(?P<id>\d+)/'
|
||||
|
||||
def _real_extract(self, url):
|
||||
video_id = self._match_id(url)
|
||||
|
||||
webpage = self._download_webpage(
|
||||
url, video_id
|
||||
)
|
||||
|
||||
title = self._html_search_regex(r'<title>(\S+ - \S+)</title>', webpage, 'title')
|
||||
|
||||
download_url = self._html_search_regex(
|
||||
|
||||
r'(https://cdn\.acidcow\.com/pics/[0-9]+/video/\S+\.mp4)',
|
||||
|
||||
webpage, "download_url"
|
||||
)
|
||||
return {
|
||||
|
||||
'id': video_id,
|
||||
'url': download_url,
|
||||
'title': title
|
||||
}
|
43
youtube_dl/extractor/metrotvnews.py
Normal file
43
youtube_dl/extractor/metrotvnews.py
Normal file
@ -0,0 +1,43 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from .common import InfoExtractor
|
||||
|
||||
|
||||
|
||||
|
||||
class MetrotvnewsIE(InfoExtractor):
|
||||
_VALID_URL = r'https:\/\/www.metrotvnews\.com\/play\/(?P<id>\S+)-\S+'
|
||||
|
||||
|
||||
def _real_extract(self, url):
|
||||
video_id = self._match_id(url)
|
||||
|
||||
webpage = self._download_webpage(
|
||||
url, video_id
|
||||
)
|
||||
|
||||
title = self._html_search_regex(r'<title>(.+) - www.metrotvnews.com<\/title>', webpage, 'title')
|
||||
'''
|
||||
download_url = self._html_search_regex(
|
||||
|
||||
r'(https:\/\/celebsroulette\.com\/get_file\/1\/\S+\/[0-9]+\/[0-9]+\/[0-9]+\.mp4)',
|
||||
|
||||
webpage, "download_url"
|
||||
)
|
||||
|
||||
download_url = self._html_search_regex(
|
||||
|
||||
r'(https:\/\/5-337-10435-2.b.cdn13.com\/contents\/videos\/3000\/3032\/3032\.mp4\?.+)',
|
||||
|
||||
webpage, "download_url"
|
||||
)
|
||||
'''
|
||||
download_url = self._html_search_regex(
|
||||
r'(https:\/\/cdn01\.metrotvnews\.com\/videos\/\d+\/\d+\/\d+\/\S+.mp4)',
|
||||
webpage, "download_url"
|
||||
)
|
||||
return {
|
||||
'id': video_id,
|
||||
'url': download_url,
|
||||
'title': title
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user