mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-12-07 20:13:50 +00:00
Compare commits
5 Commits
aed617e311
...
794771a164
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
794771a164 | ||
|
|
6f2eaaf73d | ||
|
|
4c7a4dbc4d | ||
|
|
f86b299d0e | ||
|
|
e474996541 |
@ -399,7 +399,6 @@ from .fujitv import FujiTVFODPlus7IE
|
|||||||
from .funimation import FunimationIE
|
from .funimation import FunimationIE
|
||||||
from .funk import FunkIE
|
from .funk import FunkIE
|
||||||
from .fusion import FusionIE
|
from .fusion import FusionIE
|
||||||
from .fxnetworks import FXNetworksIE
|
|
||||||
from .gaia import GaiaIE
|
from .gaia import GaiaIE
|
||||||
from .gameinformer import GameInformerIE
|
from .gameinformer import GameInformerIE
|
||||||
from .gamespot import GameSpotIE
|
from .gamespot import GameSpotIE
|
||||||
|
|||||||
@ -1,77 +0,0 @@
|
|||||||
# coding: utf-8
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from .adobepass import AdobePassIE
|
|
||||||
from ..utils import (
|
|
||||||
extract_attributes,
|
|
||||||
int_or_none,
|
|
||||||
parse_age_limit,
|
|
||||||
smuggle_url,
|
|
||||||
update_url_query,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class FXNetworksIE(AdobePassIE):
|
|
||||||
_VALID_URL = r'https?://(?:www\.)?(?:fxnetworks|simpsonsworld)\.com/video/(?P<id>\d+)'
|
|
||||||
_TESTS = [{
|
|
||||||
'url': 'http://www.fxnetworks.com/video/1032565827847',
|
|
||||||
'md5': '8d99b97b4aa7a202f55b6ed47ea7e703',
|
|
||||||
'info_dict': {
|
|
||||||
'id': 'dRzwHC_MMqIv',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'First Look: Better Things - Season 2',
|
|
||||||
'description': 'Because real life is like a fart. Watch this FIRST LOOK to see what inspired the new season of Better Things.',
|
|
||||||
'age_limit': 14,
|
|
||||||
'uploader': 'NEWA-FNG-FX',
|
|
||||||
'upload_date': '20170825',
|
|
||||||
'timestamp': 1503686274,
|
|
||||||
'episode_number': 0,
|
|
||||||
'season_number': 2,
|
|
||||||
'series': 'Better Things',
|
|
||||||
},
|
|
||||||
'add_ie': ['ThePlatform'],
|
|
||||||
}, {
|
|
||||||
'url': 'http://www.simpsonsworld.com/video/716094019682',
|
|
||||||
'only_matching': True,
|
|
||||||
}]
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
video_id = self._match_id(url)
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
|
||||||
if 'The content you are trying to access is not available in your region.' in webpage:
|
|
||||||
self.raise_geo_restricted()
|
|
||||||
video_data = extract_attributes(self._search_regex(
|
|
||||||
r'(<a.+?rel="https?://link\.theplatform\.com/s/.+?</a>)', webpage, 'video data'))
|
|
||||||
player_type = self._search_regex(r'playerType\s*=\s*[\'"]([^\'"]+)', webpage, 'player type', default=None)
|
|
||||||
release_url = video_data['rel']
|
|
||||||
title = video_data['data-title']
|
|
||||||
rating = video_data.get('data-rating')
|
|
||||||
query = {
|
|
||||||
'mbr': 'true',
|
|
||||||
}
|
|
||||||
if player_type == 'movies':
|
|
||||||
query.update({
|
|
||||||
'manifest': 'm3u',
|
|
||||||
})
|
|
||||||
else:
|
|
||||||
query.update({
|
|
||||||
'switch': 'http',
|
|
||||||
})
|
|
||||||
if video_data.get('data-req-auth') == '1':
|
|
||||||
resource = self._get_mvpd_resource(
|
|
||||||
video_data['data-channel'], title,
|
|
||||||
video_data.get('data-guid'), rating)
|
|
||||||
query['auth'] = self._extract_mvpd_auth(url, video_id, 'fx', resource)
|
|
||||||
|
|
||||||
return {
|
|
||||||
'_type': 'url_transparent',
|
|
||||||
'id': video_id,
|
|
||||||
'title': title,
|
|
||||||
'url': smuggle_url(update_url_query(release_url, query), {'force_smil_url': True}),
|
|
||||||
'series': video_data.get('data-show-title'),
|
|
||||||
'episode_number': int_or_none(video_data.get('data-episode')),
|
|
||||||
'season_number': int_or_none(video_data.get('data-season')),
|
|
||||||
'thumbnail': video_data.get('data-large-thumb'),
|
|
||||||
'age_limit': parse_age_limit(rating),
|
|
||||||
'ie_key': 'ThePlatform',
|
|
||||||
}
|
|
||||||
@ -38,13 +38,17 @@ class GoIE(AdobePassIE):
|
|||||||
'disneynow': {
|
'disneynow': {
|
||||||
'brand': '011',
|
'brand': '011',
|
||||||
'resource_id': 'Disney',
|
'resource_id': 'Disney',
|
||||||
}
|
},
|
||||||
|
'fxnow.fxnetworks': {
|
||||||
|
'brand': '025',
|
||||||
|
'requestor_id': 'dtci',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
_VALID_URL = r'''(?x)
|
_VALID_URL = r'''(?x)
|
||||||
https?://
|
https?://
|
||||||
(?:
|
(?:
|
||||||
(?:(?P<sub_domain>%s)\.)?go|
|
(?:(?P<sub_domain>%s)\.)?go|
|
||||||
(?P<sub_domain_2>abc|freeform|disneynow)
|
(?P<sub_domain_2>abc|freeform|disneynow|fxnow\.fxnetworks)
|
||||||
)\.com/
|
)\.com/
|
||||||
(?:
|
(?:
|
||||||
(?:[^/]+/)*(?P<id>[Vv][Dd][Kk][Aa]\w+)|
|
(?:[^/]+/)*(?P<id>[Vv][Dd][Kk][Aa]\w+)|
|
||||||
@ -99,6 +103,19 @@ class GoIE(AdobePassIE):
|
|||||||
# m3u8 download
|
# m3u8 download
|
||||||
'skip_download': True,
|
'skip_download': True,
|
||||||
},
|
},
|
||||||
|
}, {
|
||||||
|
'url': 'https://fxnow.fxnetworks.com/shows/better-things/video/vdka12782841',
|
||||||
|
'info_dict': {
|
||||||
|
'id': 'VDKA12782841',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'First Look: Better Things - Season 2',
|
||||||
|
'description': 'md5:fa73584a95761c605d9d54904e35b407',
|
||||||
|
},
|
||||||
|
'params': {
|
||||||
|
'geo_bypass_ip_block': '3.244.239.0/24',
|
||||||
|
# m3u8 download
|
||||||
|
'skip_download': True,
|
||||||
|
},
|
||||||
}, {
|
}, {
|
||||||
'url': 'http://abc.go.com/shows/the-catch/episode-guide/season-01/10-the-wedding',
|
'url': 'http://abc.go.com/shows/the-catch/episode-guide/season-01/10-the-wedding',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
|
|||||||
@ -1,15 +1,14 @@
|
|||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .telecinco import TelecincoIE
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
int_or_none,
|
int_or_none,
|
||||||
parse_iso8601,
|
parse_iso8601,
|
||||||
smuggle_url,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class MiTeleIE(InfoExtractor):
|
class MiTeleIE(TelecincoIE):
|
||||||
IE_DESC = 'mitele.es'
|
IE_DESC = 'mitele.es'
|
||||||
_VALID_URL = r'https?://(?:www\.)?mitele\.es/(?:[^/]+/)+(?P<id>[^/]+)/player'
|
_VALID_URL = r'https?://(?:www\.)?mitele\.es/(?:[^/]+/)+(?P<id>[^/]+)/player'
|
||||||
|
|
||||||
@ -31,7 +30,6 @@ class MiTeleIE(InfoExtractor):
|
|||||||
'timestamp': 1471209401,
|
'timestamp': 1471209401,
|
||||||
'upload_date': '20160814',
|
'upload_date': '20160814',
|
||||||
},
|
},
|
||||||
'add_ie': ['Ooyala'],
|
|
||||||
}, {
|
}, {
|
||||||
# no explicit title
|
# no explicit title
|
||||||
'url': 'http://www.mitele.es/programas-tv/cuarto-milenio/57b0de3dc915da14058b4876/player',
|
'url': 'http://www.mitele.es/programas-tv/cuarto-milenio/57b0de3dc915da14058b4876/player',
|
||||||
@ -54,7 +52,6 @@ class MiTeleIE(InfoExtractor):
|
|||||||
'params': {
|
'params': {
|
||||||
'skip_download': True,
|
'skip_download': True,
|
||||||
},
|
},
|
||||||
'add_ie': ['Ooyala'],
|
|
||||||
}, {
|
}, {
|
||||||
'url': 'http://www.mitele.es/series-online/la-que-se-avecina/57aac5c1c915da951a8b45ed/player',
|
'url': 'http://www.mitele.es/series-online/la-que-se-avecina/57aac5c1c915da951a8b45ed/player',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
@ -70,16 +67,11 @@ class MiTeleIE(InfoExtractor):
|
|||||||
r'window\.\$REACTBASE_STATE\.prePlayer_mtweb\s*=\s*({.+})',
|
r'window\.\$REACTBASE_STATE\.prePlayer_mtweb\s*=\s*({.+})',
|
||||||
webpage, 'Pre Player'), display_id)['prePlayer']
|
webpage, 'Pre Player'), display_id)['prePlayer']
|
||||||
title = pre_player['title']
|
title = pre_player['title']
|
||||||
video = pre_player['video']
|
video_info = self._parse_content(pre_player['video'], url)
|
||||||
video_id = video['dataMediaId']
|
|
||||||
content = pre_player.get('content') or {}
|
content = pre_player.get('content') or {}
|
||||||
info = content.get('info') or {}
|
info = content.get('info') or {}
|
||||||
|
|
||||||
return {
|
video_info.update({
|
||||||
'_type': 'url_transparent',
|
|
||||||
# for some reason only HLS is supported
|
|
||||||
'url': smuggle_url('ooyala:' + video_id, {'supportedformats': 'm3u8,dash'}),
|
|
||||||
'id': video_id,
|
|
||||||
'title': title,
|
'title': title,
|
||||||
'description': info.get('synopsis'),
|
'description': info.get('synopsis'),
|
||||||
'series': content.get('title'),
|
'series': content.get('title'),
|
||||||
@ -87,7 +79,7 @@ class MiTeleIE(InfoExtractor):
|
|||||||
'episode': content.get('subtitle'),
|
'episode': content.get('subtitle'),
|
||||||
'episode_number': int_or_none(info.get('episode_number')),
|
'episode_number': int_or_none(info.get('episode_number')),
|
||||||
'duration': int_or_none(info.get('duration')),
|
'duration': int_or_none(info.get('duration')),
|
||||||
'thumbnail': video.get('dataPoster'),
|
|
||||||
'age_limit': int_or_none(info.get('rating')),
|
'age_limit': int_or_none(info.get('rating')),
|
||||||
'timestamp': parse_iso8601(pre_player.get('publishedTime')),
|
'timestamp': parse_iso8601(pre_player.get('publishedTime')),
|
||||||
}
|
})
|
||||||
|
return video_info
|
||||||
|
|||||||
@ -140,7 +140,7 @@ class TeachableIE(TeachableBaseIE):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def _is_teachable(webpage):
|
def _is_teachable(webpage):
|
||||||
return 'teachableTracker.linker:autoLink' in webpage and re.search(
|
return 'teachableTracker.linker:autoLink' in webpage and re.search(
|
||||||
r'<link[^>]+href=["\']https?://process\.fs\.teachablecdn\.com',
|
r'<link[^>]+href=["\']https?://(?:process\.fs|assets)\.teachablecdn\.com',
|
||||||
webpage)
|
webpage)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|||||||
@ -5,14 +5,11 @@ import json
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from .ooyala import OoyalaIE
|
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
clean_html,
|
clean_html,
|
||||||
determine_ext,
|
|
||||||
int_or_none,
|
int_or_none,
|
||||||
str_or_none,
|
str_or_none,
|
||||||
try_get,
|
try_get,
|
||||||
urljoin,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -28,7 +25,7 @@ class TelecincoIE(InfoExtractor):
|
|||||||
'description': 'md5:716caf5601e25c3c5ab6605b1ae71529',
|
'description': 'md5:716caf5601e25c3c5ab6605b1ae71529',
|
||||||
},
|
},
|
||||||
'playlist': [{
|
'playlist': [{
|
||||||
'md5': 'adb28c37238b675dad0f042292f209a7',
|
'md5': '7ee56d665cfd241c0e6d80fd175068b0',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'JEA5ijCnF6p5W08A1rNKn7',
|
'id': 'JEA5ijCnF6p5W08A1rNKn7',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
@ -38,7 +35,7 @@ class TelecincoIE(InfoExtractor):
|
|||||||
}]
|
}]
|
||||||
}, {
|
}, {
|
||||||
'url': 'http://www.cuatro.com/deportes/futbol/barcelona/Leo_Messi-Champions-Roma_2_2052780128.html',
|
'url': 'http://www.cuatro.com/deportes/futbol/barcelona/Leo_Messi-Champions-Roma_2_2052780128.html',
|
||||||
'md5': '9468140ebc300fbb8b9d65dc6e5c4b43',
|
'md5': 'c86fe0d99e3bdb46b7950d38bf6ef12a',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'jn24Od1zGLG4XUZcnUnZB6',
|
'id': 'jn24Od1zGLG4XUZcnUnZB6',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
@ -48,7 +45,7 @@ class TelecincoIE(InfoExtractor):
|
|||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
'url': 'http://www.mediaset.es/12meses/campanas/doylacara/conlatratanohaytrato/Ayudame-dar-cara-trata-trato_2_1986630220.html',
|
'url': 'http://www.mediaset.es/12meses/campanas/doylacara/conlatratanohaytrato/Ayudame-dar-cara-trata-trato_2_1986630220.html',
|
||||||
'md5': 'ae2dc6b7b50b2392076a51c0f70e01f6',
|
'md5': 'eddb50291df704ce23c74821b995bcac',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'aywerkD2Sv1vGNqq9b85Q2',
|
'id': 'aywerkD2Sv1vGNqq9b85Q2',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
@ -90,58 +87,24 @@ class TelecincoIE(InfoExtractor):
|
|||||||
|
|
||||||
def _parse_content(self, content, url):
|
def _parse_content(self, content, url):
|
||||||
video_id = content['dataMediaId']
|
video_id = content['dataMediaId']
|
||||||
if content.get('dataCmsId') == 'ooyala':
|
|
||||||
return self.url_result(
|
|
||||||
'ooyala:%s' % video_id, OoyalaIE.ie_key(), video_id)
|
|
||||||
config_url = urljoin(url, content['dataConfig'])
|
|
||||||
config = self._download_json(
|
config = self._download_json(
|
||||||
config_url, video_id, 'Downloading config JSON')
|
content['dataConfig'], video_id, 'Downloading config JSON')
|
||||||
title = config['info']['title']
|
title = config['info']['title']
|
||||||
|
services = config['services']
|
||||||
def mmc_url(mmc_type):
|
caronte = self._download_json(services['caronte'], video_id)
|
||||||
return re.sub(
|
stream = caronte['dls'][0]['stream']
|
||||||
r'/(?:flash|html5)\.json', '/%s.json' % mmc_type,
|
headers = self.geo_verification_headers()
|
||||||
config['services']['mmc'])
|
headers.update({
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8',
|
||||||
duration = None
|
'Origin': re.match(r'https?://[^/]+', url).group(0),
|
||||||
formats = []
|
})
|
||||||
for mmc_type in ('flash', 'html5'):
|
cdn = self._download_json(
|
||||||
mmc = self._download_json(
|
caronte['cerbero'], video_id, data=json.dumps({
|
||||||
mmc_url(mmc_type), video_id,
|
'bbx': caronte['bbx'],
|
||||||
'Downloading %s mmc JSON' % mmc_type, fatal=False)
|
'gbx': self._download_json(services['gbx'], video_id)['gbx'],
|
||||||
if not mmc:
|
}).encode(), headers=headers)['tokens']['1']['cdn']
|
||||||
continue
|
formats = self._extract_m3u8_formats(
|
||||||
if not duration:
|
stream + '?' + cdn, video_id, 'mp4', 'm3u8_native', m3u8_id='hls')
|
||||||
duration = int_or_none(mmc.get('duration'))
|
|
||||||
for location in mmc['locations']:
|
|
||||||
gat = self._proto_relative_url(location.get('gat'), 'http:')
|
|
||||||
gcp = location.get('gcp')
|
|
||||||
ogn = location.get('ogn')
|
|
||||||
if None in (gat, gcp, ogn):
|
|
||||||
continue
|
|
||||||
token_data = {
|
|
||||||
'gcp': gcp,
|
|
||||||
'ogn': ogn,
|
|
||||||
'sta': 0,
|
|
||||||
}
|
|
||||||
media = self._download_json(
|
|
||||||
gat, video_id, data=json.dumps(token_data).encode('utf-8'),
|
|
||||||
headers={
|
|
||||||
'Content-Type': 'application/json;charset=utf-8',
|
|
||||||
'Referer': url,
|
|
||||||
}, fatal=False) or {}
|
|
||||||
stream = media.get('stream') or media.get('file')
|
|
||||||
if not stream:
|
|
||||||
continue
|
|
||||||
ext = determine_ext(stream)
|
|
||||||
if ext == 'f4m':
|
|
||||||
formats.extend(self._extract_f4m_formats(
|
|
||||||
stream + '&hdcore=3.2.0&plugin=aasp-3.2.0.77.18',
|
|
||||||
video_id, f4m_id='hds', fatal=False))
|
|
||||||
elif ext == 'm3u8':
|
|
||||||
formats.extend(self._extract_m3u8_formats(
|
|
||||||
stream, video_id, 'mp4', 'm3u8_native',
|
|
||||||
m3u8_id='hls', fatal=False))
|
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -149,7 +112,7 @@ class TelecincoIE(InfoExtractor):
|
|||||||
'title': title,
|
'title': title,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
'thumbnail': content.get('dataPoster') or config.get('poster', {}).get('imageUrl'),
|
'thumbnail': content.get('dataPoster') or config.get('poster', {}).get('imageUrl'),
|
||||||
'duration': duration,
|
'duration': int_or_none(content.get('dataDuration')),
|
||||||
}
|
}
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
|
|||||||
@ -321,7 +321,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
# Invidious instances taken from https://github.com/omarroth/invidious/wiki/Invidious-Instances
|
# Invidious instances taken from https://github.com/omarroth/invidious/wiki/Invidious-Instances
|
||||||
(?:(?:www|dev)\.)?invidio\.us/|
|
(?:(?:www|dev)\.)?invidio\.us/|
|
||||||
(?:(?:www|no)\.)?invidiou\.sh/|
|
(?:(?:www|no)\.)?invidiou\.sh/|
|
||||||
(?:(?:www|fi|de)\.)?invidious\.snopyta\.org/|
|
(?:(?:www|fi)\.)?invidious\.snopyta\.org/|
|
||||||
(?:www\.)?invidious\.kabi\.tk/|
|
(?:www\.)?invidious\.kabi\.tk/|
|
||||||
(?:www\.)?invidious\.13ad\.de/|
|
(?:www\.)?invidious\.13ad\.de/|
|
||||||
(?:www\.)?invidious\.mastodon\.host/|
|
(?:www\.)?invidious\.mastodon\.host/|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user