adding a valid_url for metrotvnews

This commit is contained in:
Dante 2020-04-08 16:25:53 -07:00
parent 908d8d2bcc
commit 3e863e3418
3 changed files with 45 additions and 33 deletions

View File

@ -490,7 +490,7 @@ from .ivi import (
from .ivideon import IvideonIE from .ivideon import IvideonIE
from .iwara import IwaraIE from .iwara import IwaraIE
from .ixigua import IxiguaIE
from .izlesene import IzleseneIE from .izlesene import IzleseneIE
from .jamendo import ( from .jamendo import (
JamendoIE, JamendoIE,
@ -618,6 +618,7 @@ from .melonvod import MelonVODIE
from .meta import METAIE from .meta import METAIE
from .metacafe import MetacafeIE from .metacafe import MetacafeIE
from .metacritic import MetacriticIE from .metacritic import MetacriticIE
from .metrotvnews import MetrotvnewsIE
from .mgoon import MgoonIE from .mgoon import MgoonIE
from .mgtv import MGTVIE from .mgtv import MGTVIE
from .miaopai import MiaoPaiIE from .miaopai import MiaoPaiIE

View File

@ -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
}

View 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
}