mirror of https://github.com/yt-dlp/yt-dlp
Merge 094831acf6
into 404bd889d0
commit
0c8b386a6e
@ -1,79 +1,47 @@
|
|||||||
from .mtv import MTVServicesInfoExtractor
|
from .mtv import MTVServicesBaseIE
|
||||||
from ..utils import unified_strdate
|
|
||||||
|
|
||||||
|
|
||||||
class BetIE(MTVServicesInfoExtractor):
|
class BetIE(MTVServicesBaseIE):
|
||||||
_WORKING = False
|
_VALID_URL = r'https?://(?:www\.)?bet\.com/(?:video-clips|episodes)/(?P<id>[\da-z]{6})'
|
||||||
_VALID_URL = r'https?://(?:www\.)?bet\.com/(?:[^/]+/)+(?P<id>.+?)\.html'
|
_TESTS = [{
|
||||||
_TESTS = [
|
'url': 'https://www.bet.com/video-clips/w9mk7v',
|
||||||
{
|
|
||||||
'url': 'http://www.bet.com/news/politics/2014/12/08/in-bet-exclusive-obama-talks-race-and-racism.html',
|
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '07e96bd3-8850-3051-b856-271b457f0ab8',
|
'id': '3022d121-d191-43fd-b5fb-b2c26f335497',
|
||||||
'display_id': 'in-bet-exclusive-obama-talks-race-and-racism',
|
'ext': 'mp4',
|
||||||
'ext': 'flv',
|
'display_id': 'w9mk7v',
|
||||||
'title': 'A Conversation With President Obama',
|
'title': 'New Normal',
|
||||||
'description': 'President Obama urges persistence in confronting racism and bias.',
|
'description': 'md5:d7898c124713b4646cecad9d16ff01f3',
|
||||||
'duration': 1534,
|
'duration': 30.08,
|
||||||
'upload_date': '20141208',
|
'series': 'Tyler Perry\'s Sistas',
|
||||||
'thumbnail': r're:(?i)^https?://.*\.jpg$',
|
'season': 'Season 0',
|
||||||
'subtitles': {
|
'season_number': 0,
|
||||||
'en': 'mincount:2',
|
'episode': 'Episode 0',
|
||||||
},
|
'episode_number': 0,
|
||||||
},
|
'timestamp': 1755269073,
|
||||||
'params': {
|
'upload_date': '20250815',
|
||||||
# rtmp download
|
},
|
||||||
'skip_download': True,
|
'params': {'skip_download': 'm3u8'},
|
||||||
},
|
}, {
|
||||||
},
|
'url': 'https://www.bet.com/episodes/nmce72/tyler-perry-s-sistas-heavy-is-the-crown-season-9-ep-5',
|
||||||
{
|
|
||||||
'url': 'http://www.bet.com/video/news/national/2014/justice-for-ferguson-a-community-reacts.html',
|
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '9f516bf1-7543-39c4-8076-dd441b459ba9',
|
'id': '6427562b-3029-11f0-b405-16fff45bc035',
|
||||||
'display_id': 'justice-for-ferguson-a-community-reacts',
|
'ext': 'mp4',
|
||||||
'ext': 'flv',
|
'display_id': 'nmce72',
|
||||||
'title': 'Justice for Ferguson: A Community Reacts',
|
'title': 'Heavy Is the Crown',
|
||||||
'description': 'A BET News special.',
|
'description': 'md5:1ed345d3157a50572d2464afcc7a652a',
|
||||||
'duration': 1696,
|
'channel': 'BET',
|
||||||
'upload_date': '20141125',
|
'duration': 2550.0,
|
||||||
'thumbnail': r're:(?i)^https?://.*\.jpg$',
|
'thumbnail': r're:https://images\.paramount\.tech/uri/mgid:arc:imageassetref',
|
||||||
'subtitles': {
|
'series': 'Tyler Perry\'s Sistas',
|
||||||
'en': 'mincount:2',
|
'season': 'Season 9',
|
||||||
},
|
'season_number': 9,
|
||||||
},
|
'episode': 'Episode 5',
|
||||||
'params': {
|
'episode_number': 5,
|
||||||
# rtmp download
|
'timestamp': 1755165600,
|
||||||
'skip_download': True,
|
'upload_date': '20250814',
|
||||||
},
|
'release_timestamp': 1755129600,
|
||||||
},
|
'release_date': '20250814',
|
||||||
]
|
},
|
||||||
|
'params': {'skip_download': 'm3u8'},
|
||||||
_FEED_URL = 'http://feeds.mtvnservices.com/od/feed/bet-mrss-player'
|
'skip': 'Requires provider sign-in',
|
||||||
|
}]
|
||||||
def _get_feed_query(self, uri):
|
|
||||||
return {
|
|
||||||
'uuid': uri,
|
|
||||||
}
|
|
||||||
|
|
||||||
def _extract_mgid(self, webpage):
|
|
||||||
return self._search_regex(r'data-uri="([^"]+)', webpage, 'mgid')
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
display_id = self._match_id(url)
|
|
||||||
|
|
||||||
webpage = self._download_webpage(url, display_id)
|
|
||||||
mgid = self._extract_mgid(webpage)
|
|
||||||
videos_info = self._get_videos_info(mgid)
|
|
||||||
|
|
||||||
info_dict = videos_info['entries'][0]
|
|
||||||
|
|
||||||
upload_date = unified_strdate(self._html_search_meta('date', webpage))
|
|
||||||
description = self._html_search_meta('description', webpage)
|
|
||||||
|
|
||||||
info_dict.update({
|
|
||||||
'display_id': display_id,
|
|
||||||
'description': description,
|
|
||||||
'upload_date': upload_date,
|
|
||||||
})
|
|
||||||
|
|
||||||
return info_dict
|
|
||||||
|
@ -1,55 +0,0 @@
|
|||||||
from .mtv import MTVIE
|
|
||||||
|
|
||||||
# TODO: Remove - Reason: Outdated Site
|
|
||||||
|
|
||||||
|
|
||||||
class CMTIE(MTVIE): # XXX: Do not subclass from concrete IE
|
|
||||||
_WORKING = False
|
|
||||||
IE_NAME = 'cmt.com'
|
|
||||||
_VALID_URL = r'https?://(?:www\.)?cmt\.com/(?:videos|shows|(?:full-)?episodes|video-clips)/(?P<id>[^/]+)'
|
|
||||||
|
|
||||||
_TESTS = [{
|
|
||||||
'url': 'http://www.cmt.com/videos/garth-brooks/989124/the-call-featuring-trisha-yearwood.jhtml#artist=30061',
|
|
||||||
'md5': 'e6b7ef3c4c45bbfae88061799bbba6c2',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '989124',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'Garth Brooks - "The Call (featuring Trisha Yearwood)"',
|
|
||||||
'description': 'Blame It All On My Roots',
|
|
||||||
},
|
|
||||||
'skip': 'Video not available',
|
|
||||||
}, {
|
|
||||||
'url': 'http://www.cmt.com/videos/misc/1504699/still-the-king-ep-109-in-3-minutes.jhtml#id=1739908',
|
|
||||||
'md5': 'e61a801ca4a183a466c08bd98dccbb1c',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '1504699',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'Still The King Ep. 109 in 3 Minutes',
|
|
||||||
'description': 'Relive or catch up with Still The King by watching this recap of season 1, episode 9.',
|
|
||||||
'timestamp': 1469421000.0,
|
|
||||||
'upload_date': '20160725',
|
|
||||||
},
|
|
||||||
}, {
|
|
||||||
'url': 'http://www.cmt.com/shows/party-down-south/party-down-south-ep-407-gone-girl/1738172/playlist/#id=1738172',
|
|
||||||
'only_matching': True,
|
|
||||||
}, {
|
|
||||||
'url': 'http://www.cmt.com/full-episodes/537qb3/nashville-the-wayfaring-stranger-season-5-ep-501',
|
|
||||||
'only_matching': True,
|
|
||||||
}, {
|
|
||||||
'url': 'http://www.cmt.com/video-clips/t9e4ci/nashville-juliette-in-2-minutes',
|
|
||||||
'only_matching': True,
|
|
||||||
}]
|
|
||||||
|
|
||||||
def _extract_mgid(self, webpage, url):
|
|
||||||
mgid = self._search_regex(
|
|
||||||
r'MTVN\.VIDEO\.contentUri\s*=\s*([\'"])(?P<mgid>.+?)\1',
|
|
||||||
webpage, 'mgid', group='mgid', default=None)
|
|
||||||
if not mgid:
|
|
||||||
mgid = self._extract_triforce_mgid(webpage)
|
|
||||||
return mgid
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
video_id = self._match_id(url)
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
|
||||||
mgid = self._extract_mgid(webpage, url)
|
|
||||||
return self.url_result(f'http://media.mtvnservices.com/embed/{mgid}')
|
|
@ -1,46 +0,0 @@
|
|||||||
from .mtv import MTVServicesInfoExtractor
|
|
||||||
|
|
||||||
|
|
||||||
class BellatorIE(MTVServicesInfoExtractor):
|
|
||||||
_VALID_URL = r'https?://(?:www\.)?bellator\.com/[^/]+/[\da-z]{6}(?:[/?#&]|$)'
|
|
||||||
_TESTS = [{
|
|
||||||
'url': 'http://www.bellator.com/fight/atwr7k/bellator-158-michael-page-vs-evangelista-cyborg',
|
|
||||||
'info_dict': {
|
|
||||||
'title': 'Michael Page vs. Evangelista Cyborg',
|
|
||||||
'description': 'md5:0d917fc00ffd72dd92814963fc6cbb05',
|
|
||||||
},
|
|
||||||
'playlist_count': 3,
|
|
||||||
}, {
|
|
||||||
'url': 'http://www.bellator.com/video-clips/bw6k7n/bellator-158-foundations-michael-venom-page',
|
|
||||||
'only_matching': True,
|
|
||||||
}]
|
|
||||||
|
|
||||||
_FEED_URL = 'http://www.bellator.com/feeds/mrss/'
|
|
||||||
_GEO_COUNTRIES = ['US']
|
|
||||||
|
|
||||||
|
|
||||||
class ParamountNetworkIE(MTVServicesInfoExtractor):
|
|
||||||
_VALID_URL = r'https?://(?:www\.)?paramountnetwork\.com/[^/]+/[\da-z]{6}(?:[/?#&]|$)'
|
|
||||||
_TESTS = [{
|
|
||||||
'url': 'http://www.paramountnetwork.com/episodes/j830qm/lip-sync-battle-joel-mchale-vs-jim-rash-season-2-ep-13',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '37ace3a8-1df6-48be-85b8-38df8229e241',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'Lip Sync Battle|April 28, 2016|2|209|Joel McHale Vs. Jim Rash|Act 1',
|
|
||||||
'description': 'md5:a739ca8f978a7802f67f8016d27ce114',
|
|
||||||
},
|
|
||||||
'params': {
|
|
||||||
# m3u8 download
|
|
||||||
'skip_download': True,
|
|
||||||
},
|
|
||||||
}]
|
|
||||||
|
|
||||||
_FEED_URL = 'http://feeds.mtvnservices.com/od/feed/intl-mrss-player-feed'
|
|
||||||
_GEO_COUNTRIES = ['US']
|
|
||||||
|
|
||||||
def _get_feed_query(self, uri):
|
|
||||||
return {
|
|
||||||
'arcEp': 'paramountnetwork.com',
|
|
||||||
'imageEp': 'paramountnetwork.com',
|
|
||||||
'mgid': uri,
|
|
||||||
}
|
|
@ -1,37 +0,0 @@
|
|||||||
from .mtv import MTVServicesInfoExtractor
|
|
||||||
|
|
||||||
# TODO: Remove - Reason not used anymore - Service moved to youtube
|
|
||||||
|
|
||||||
|
|
||||||
class TVLandIE(MTVServicesInfoExtractor):
|
|
||||||
IE_NAME = 'tvland.com'
|
|
||||||
_VALID_URL = r'https?://(?:www\.)?tvland\.com/(?:video-clips|(?:full-)?episodes)/(?P<id>[^/?#.]+)'
|
|
||||||
_FEED_URL = 'http://www.tvland.com/feeds/mrss/'
|
|
||||||
_TESTS = [{
|
|
||||||
# Geo-restricted. Without a proxy metadata are still there. With a
|
|
||||||
# proxy it redirects to http://m.tvland.com/app/
|
|
||||||
'url': 'https://www.tvland.com/episodes/s04pzf/everybody-loves-raymond-the-dog-season-1-ep-19',
|
|
||||||
'info_dict': {
|
|
||||||
'description': 'md5:84928e7a8ad6649371fbf5da5e1ad75a',
|
|
||||||
'title': 'The Dog',
|
|
||||||
},
|
|
||||||
'playlist_mincount': 5,
|
|
||||||
'skip': '404 Not found',
|
|
||||||
}, {
|
|
||||||
'url': 'https://www.tvland.com/video-clips/4n87f2/younger-a-first-look-at-younger-season-6',
|
|
||||||
'md5': 'e2c6389401cf485df26c79c247b08713',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '891f7d3c-5b5b-4753-b879-b7ba1a601757',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'Younger|April 30, 2019|6|NO-EPISODE#|A First Look at Younger Season 6',
|
|
||||||
'description': 'md5:595ea74578d3a888ae878dfd1c7d4ab2',
|
|
||||||
'upload_date': '20190430',
|
|
||||||
'timestamp': 1556658000,
|
|
||||||
},
|
|
||||||
'params': {
|
|
||||||
'skip_download': True,
|
|
||||||
},
|
|
||||||
}, {
|
|
||||||
'url': 'http://www.tvland.com/full-episodes/iu0hz6/younger-a-kiss-is-just-a-kiss-season-3-ep-301',
|
|
||||||
'only_matching': True,
|
|
||||||
}]
|
|
Loading…
Reference in New Issue