mirror of https://github.com/yt-dlp/yt-dlp
parent
f4f9f6d00e
commit
df773c3d5d
@ -1,98 +0,0 @@
|
|||||||
from .cbs import CBSIE
|
|
||||||
from ..utils import int_or_none
|
|
||||||
|
|
||||||
|
|
||||||
class CBSInteractiveIE(CBSIE): # XXX: Do not subclass from concrete IE
|
|
||||||
_VALID_URL = r'https?://(?:www\.)?(?P<site>cnet|zdnet)\.com/(?:videos|video(?:/share)?)/(?P<id>[^/?]+)'
|
|
||||||
_TESTS = [{
|
|
||||||
'url': 'http://www.cnet.com/videos/hands-on-with-microsofts-windows-8-1-update/',
|
|
||||||
'info_dict': {
|
|
||||||
'id': 'R49SYt__yAfmlXR85z4f7gNmCBDcN_00',
|
|
||||||
'display_id': 'hands-on-with-microsofts-windows-8-1-update',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'Hands-on with Microsoft Windows 8.1 Update',
|
|
||||||
'description': 'The new update to the Windows 8 OS brings improved performance for mouse and keyboard users.',
|
|
||||||
'uploader_id': '6085384d-619e-11e3-b231-14feb5ca9861',
|
|
||||||
'uploader': 'Sarah Mitroff',
|
|
||||||
'duration': 70,
|
|
||||||
'timestamp': 1396479627,
|
|
||||||
'upload_date': '20140402',
|
|
||||||
},
|
|
||||||
'params': {
|
|
||||||
# m3u8 download
|
|
||||||
'skip_download': True,
|
|
||||||
},
|
|
||||||
}, {
|
|
||||||
'url': 'http://www.cnet.com/videos/whiny-pothole-tweets-at-local-government-when-hit-by-cars-tomorrow-daily-187/',
|
|
||||||
'md5': 'f11d27b2fa18597fbf92444d2a9ed386',
|
|
||||||
'info_dict': {
|
|
||||||
'id': 'kjOJd_OoVJqbg_ZD8MZCOk8Wekb9QccK',
|
|
||||||
'display_id': 'whiny-pothole-tweets-at-local-government-when-hit-by-cars-tomorrow-daily-187',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'Whiny potholes tweet at local government when hit by cars (Tomorrow Daily 187)',
|
|
||||||
'description': 'md5:d2b9a95a5ffe978ae6fbd4cf944d618f',
|
|
||||||
'uploader_id': 'b163284d-6b73-44fc-b3e6-3da66c392d40',
|
|
||||||
'uploader': 'Ashley Esqueda',
|
|
||||||
'duration': 1482,
|
|
||||||
'timestamp': 1433289889,
|
|
||||||
'upload_date': '20150603',
|
|
||||||
},
|
|
||||||
}, {
|
|
||||||
'url': 'http://www.zdnet.com/video/share/video-keeping-android-smartphones-and-tablets-secure/',
|
|
||||||
'info_dict': {
|
|
||||||
'id': 'k0r4T_ehht4xW_hAOqiVQPuBDPZ8SRjt',
|
|
||||||
'display_id': 'video-keeping-android-smartphones-and-tablets-secure',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'Video: Keeping Android smartphones and tablets secure',
|
|
||||||
'description': 'Here\'s the best way to keep Android devices secure, and what you do when they\'ve come to the end of their lives.',
|
|
||||||
'uploader_id': 'f2d97ea2-8175-11e2-9d12-0018fe8a00b0',
|
|
||||||
'uploader': 'Adrian Kingsley-Hughes',
|
|
||||||
'duration': 731,
|
|
||||||
'timestamp': 1449129925,
|
|
||||||
'upload_date': '20151203',
|
|
||||||
},
|
|
||||||
'params': {
|
|
||||||
# m3u8 download
|
|
||||||
'skip_download': True,
|
|
||||||
},
|
|
||||||
}, {
|
|
||||||
'url': 'http://www.zdnet.com/video/huawei-matebook-x-video/',
|
|
||||||
'only_matching': True,
|
|
||||||
}]
|
|
||||||
|
|
||||||
MPX_ACCOUNTS = {
|
|
||||||
'cnet': 2198311517,
|
|
||||||
'zdnet': 2387448114,
|
|
||||||
}
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
site, display_id = self._match_valid_url(url).groups()
|
|
||||||
webpage = self._download_webpage(url, display_id)
|
|
||||||
|
|
||||||
data_json = self._html_search_regex(
|
|
||||||
r"data(?:-(?:cnet|zdnet))?-video(?:-(?:uvp(?:js)?|player))?-options='([^']+)'",
|
|
||||||
webpage, 'data json')
|
|
||||||
data = self._parse_json(data_json, display_id)
|
|
||||||
vdata = data.get('video') or (data.get('videos') or data.get('playlist'))[0]
|
|
||||||
|
|
||||||
video_id = vdata['mpxRefId']
|
|
||||||
|
|
||||||
title = vdata['title']
|
|
||||||
author = vdata.get('author')
|
|
||||||
if author:
|
|
||||||
uploader = '%s %s' % (author['firstName'], author['lastName'])
|
|
||||||
uploader_id = author.get('id')
|
|
||||||
else:
|
|
||||||
uploader = None
|
|
||||||
uploader_id = None
|
|
||||||
|
|
||||||
info = self._extract_video_info(video_id, site, self.MPX_ACCOUNTS[site])
|
|
||||||
info.update({
|
|
||||||
'id': video_id,
|
|
||||||
'display_id': display_id,
|
|
||||||
'title': title,
|
|
||||||
'duration': int_or_none(vdata.get('duration')),
|
|
||||||
'uploader': uploader,
|
|
||||||
'uploader_id': uploader_id,
|
|
||||||
})
|
|
||||||
return info
|
|
@ -1,199 +0,0 @@
|
|||||||
import itertools
|
|
||||||
import json
|
|
||||||
import urllib.parse
|
|
||||||
|
|
||||||
from .common import InfoExtractor
|
|
||||||
from ..utils import (
|
|
||||||
ExtractorError,
|
|
||||||
clean_html,
|
|
||||||
int_or_none,
|
|
||||||
str_to_int,
|
|
||||||
url_or_none,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class ChingariBaseIE(InfoExtractor):
|
|
||||||
def _get_post(self, id, post_data):
|
|
||||||
media_data = post_data['mediaLocation']
|
|
||||||
base_url = media_data['base']
|
|
||||||
author_data = post_data.get('authorData', {})
|
|
||||||
song_data = post_data.get('song', {}) # revist this in future for differentiating b/w 'art' and 'author'
|
|
||||||
|
|
||||||
formats = [{
|
|
||||||
'format_id': frmt,
|
|
||||||
'width': str_to_int(frmt[1:]),
|
|
||||||
'url': base_url + frmt_path,
|
|
||||||
} for frmt, frmt_path in media_data.get('transcoded', {}).items()]
|
|
||||||
|
|
||||||
if media_data.get('path'):
|
|
||||||
formats.append({
|
|
||||||
'format_id': 'original',
|
|
||||||
'format_note': 'Direct video.',
|
|
||||||
'url': base_url + '/apipublic' + media_data['path'],
|
|
||||||
'quality': 10,
|
|
||||||
})
|
|
||||||
timestamp = str_to_int(post_data.get('created_at'))
|
|
||||||
if timestamp:
|
|
||||||
timestamp = int_or_none(timestamp, 1000)
|
|
||||||
|
|
||||||
thumbnail, uploader_url = None, None
|
|
||||||
if media_data.get('thumbnail'):
|
|
||||||
thumbnail = base_url + media_data.get('thumbnail')
|
|
||||||
if author_data.get('username'):
|
|
||||||
uploader_url = 'https://chingari.io/' + author_data.get('username')
|
|
||||||
|
|
||||||
return {
|
|
||||||
'id': id,
|
|
||||||
'extractor_key': ChingariIE.ie_key(),
|
|
||||||
'extractor': 'Chingari',
|
|
||||||
'title': urllib.parse.unquote_plus(clean_html(post_data.get('caption'))),
|
|
||||||
'description': urllib.parse.unquote_plus(clean_html(post_data.get('caption'))),
|
|
||||||
'duration': media_data.get('duration'),
|
|
||||||
'thumbnail': url_or_none(thumbnail),
|
|
||||||
'like_count': post_data.get('likeCount'),
|
|
||||||
'view_count': post_data.get('viewsCount'),
|
|
||||||
'comment_count': post_data.get('commentCount'),
|
|
||||||
'repost_count': post_data.get('shareCount'),
|
|
||||||
'timestamp': timestamp,
|
|
||||||
'uploader_id': post_data.get('userId') or author_data.get('_id'),
|
|
||||||
'uploader': author_data.get('name'),
|
|
||||||
'uploader_url': url_or_none(uploader_url),
|
|
||||||
'track': song_data.get('title'),
|
|
||||||
'artist': song_data.get('author'),
|
|
||||||
'formats': formats,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class ChingariIE(ChingariBaseIE):
|
|
||||||
_VALID_URL = r'https?://(?:www\.)?chingari\.io/share/post\?id=(?P<id>[^&/#?]+)'
|
|
||||||
_TESTS = [{
|
|
||||||
'url': 'https://chingari.io/share/post?id=612f8f4ce1dc57090e8a7beb',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '612f8f4ce1dc57090e8a7beb',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'Happy birthday Srila Prabhupada',
|
|
||||||
'description': 'md5:c7080ebfdfeb06016e638c286d6bc3fa',
|
|
||||||
'duration': 0,
|
|
||||||
'thumbnail': 'https://media.chingari.io/uploads/c41d30e2-06b6-4e3b-9b4b-edbb929cec06-1630506826911/thumbnail/198f993f-ce87-4623-82c6-cd071bd6d4f4-1630506828016.jpg',
|
|
||||||
'like_count': int,
|
|
||||||
'view_count': int,
|
|
||||||
'comment_count': int,
|
|
||||||
'repost_count': int,
|
|
||||||
'timestamp': 1630506828,
|
|
||||||
'upload_date': '20210901',
|
|
||||||
'uploader_id': '5f0403982c8bd344f4813f8c',
|
|
||||||
'uploader': 'ISKCON,Inc.',
|
|
||||||
'uploader_url': 'https://chingari.io/iskcon,inc',
|
|
||||||
},
|
|
||||||
'params': {'skip_download': True}
|
|
||||||
}]
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
id = self._match_id(url)
|
|
||||||
post_json = self._download_json(f'https://api.chingari.io/post/post_details/{id}', id)
|
|
||||||
if post_json['code'] != 200:
|
|
||||||
raise ExtractorError(post_json['message'], expected=True)
|
|
||||||
post_data = post_json['data']
|
|
||||||
return self._get_post(id, post_data)
|
|
||||||
|
|
||||||
|
|
||||||
class ChingariUserIE(ChingariBaseIE):
|
|
||||||
_VALID_URL = r'https?://(?:www\.)?chingari\.io/(?!share/post)(?P<id>[^/?]+)'
|
|
||||||
_TESTS = [{
|
|
||||||
'url': 'https://chingari.io/dada1023',
|
|
||||||
'info_dict': {
|
|
||||||
'id': 'dada1023',
|
|
||||||
},
|
|
||||||
'params': {'playlistend': 3},
|
|
||||||
'playlist': [{
|
|
||||||
'url': 'https://chingari.io/share/post?id=614781f3ade60b3a0bfff42a',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '614781f3ade60b3a0bfff42a',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': '#chingaribappa ',
|
|
||||||
'description': 'md5:d1df21d84088770468fa63afe3b17857',
|
|
||||||
'duration': 7,
|
|
||||||
'thumbnail': 'https://media.chingari.io/uploads/346d86d4-abb2-474e-a164-ffccf2bbcb72-1632076273717/thumbnail/b0b3aac2-2b86-4dd1-909d-9ed6e57cf77c-1632076275552.jpg',
|
|
||||||
'like_count': int,
|
|
||||||
'view_count': int,
|
|
||||||
'comment_count': int,
|
|
||||||
'repost_count': int,
|
|
||||||
'timestamp': 1632076275,
|
|
||||||
'upload_date': '20210919',
|
|
||||||
'uploader_id': '5efc4b12cca35c3d1794c2d3',
|
|
||||||
'uploader': 'dada (girish) dhawale',
|
|
||||||
'uploader_url': 'https://chingari.io/dada1023',
|
|
||||||
},
|
|
||||||
'params': {'skip_download': True}
|
|
||||||
}, {
|
|
||||||
'url': 'https://chingari.io/share/post?id=6146b132bcbf860959e12cba',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '6146b132bcbf860959e12cba',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'Tactor harvesting',
|
|
||||||
'description': 'md5:8403f12dce68828b77ecee7eb7e887b7',
|
|
||||||
'duration': 59.3,
|
|
||||||
'thumbnail': 'https://media.chingari.io/uploads/b353ca70-7a87-400d-93a6-fa561afaec86-1632022814584/thumbnail/c09302e3-2043-41b1-a2fe-77d97e5bd676-1632022834260.jpg',
|
|
||||||
'like_count': int,
|
|
||||||
'view_count': int,
|
|
||||||
'comment_count': int,
|
|
||||||
'repost_count': int,
|
|
||||||
'timestamp': 1632022834,
|
|
||||||
'upload_date': '20210919',
|
|
||||||
'uploader_id': '5efc4b12cca35c3d1794c2d3',
|
|
||||||
'uploader': 'dada (girish) dhawale',
|
|
||||||
'uploader_url': 'https://chingari.io/dada1023',
|
|
||||||
},
|
|
||||||
'params': {'skip_download': True}
|
|
||||||
}, {
|
|
||||||
'url': 'https://chingari.io/share/post?id=6145651b74cb030a64c40b82',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '6145651b74cb030a64c40b82',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': '#odiabhajan ',
|
|
||||||
'description': 'md5:687ea36835b9276cf2af90f25e7654cb',
|
|
||||||
'duration': 56.67,
|
|
||||||
'thumbnail': 'https://media.chingari.io/uploads/6cbf216b-babc-4cce-87fe-ceaac8d706ac-1631937782708/thumbnail/8855754f-6669-48ce-b269-8cc0699ed6da-1631937819522.jpg',
|
|
||||||
'like_count': int,
|
|
||||||
'view_count': int,
|
|
||||||
'comment_count': int,
|
|
||||||
'repost_count': int,
|
|
||||||
'timestamp': 1631937819,
|
|
||||||
'upload_date': '20210918',
|
|
||||||
'uploader_id': '5efc4b12cca35c3d1794c2d3',
|
|
||||||
'uploader': 'dada (girish) dhawale',
|
|
||||||
'uploader_url': 'https://chingari.io/dada1023',
|
|
||||||
},
|
|
||||||
'params': {'skip_download': True}
|
|
||||||
}],
|
|
||||||
}, {
|
|
||||||
'url': 'https://chingari.io/iskcon%2Cinc',
|
|
||||||
'playlist_mincount': 1025,
|
|
||||||
'info_dict': {
|
|
||||||
'id': 'iskcon%2Cinc',
|
|
||||||
},
|
|
||||||
}]
|
|
||||||
|
|
||||||
def _entries(self, id):
|
|
||||||
skip = 0
|
|
||||||
has_more = True
|
|
||||||
for page in itertools.count():
|
|
||||||
posts = self._download_json('https://api.chingari.io/users/getPosts', id,
|
|
||||||
data=json.dumps({'userId': id, 'ownerId': id, 'skip': skip, 'limit': 20}).encode(),
|
|
||||||
headers={'content-type': 'application/json;charset=UTF-8'},
|
|
||||||
note='Downloading page %s' % page)
|
|
||||||
for post in posts.get('data', []):
|
|
||||||
post_data = post['post']
|
|
||||||
yield self._get_post(post_data['_id'], post_data)
|
|
||||||
skip += 20
|
|
||||||
has_more = posts['hasMoreData']
|
|
||||||
if not has_more:
|
|
||||||
break
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
alt_id = self._match_id(url)
|
|
||||||
post_json = self._download_json(f'https://api.chingari.io/user/{alt_id}', alt_id)
|
|
||||||
if post_json['code'] != 200:
|
|
||||||
raise ExtractorError(post_json['message'], expected=True)
|
|
||||||
id = post_json['data']['_id']
|
|
||||||
return self.playlist_result(self._entries(id), playlist_id=alt_id)
|
|
@ -1,76 +0,0 @@
|
|||||||
from .common import InfoExtractor
|
|
||||||
from ..utils import (
|
|
||||||
int_or_none,
|
|
||||||
url_or_none,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class CliphunterIE(InfoExtractor):
|
|
||||||
IE_NAME = 'cliphunter'
|
|
||||||
|
|
||||||
_VALID_URL = r'''(?x)https?://(?:www\.)?cliphunter\.com/w/
|
|
||||||
(?P<id>[0-9]+)/
|
|
||||||
(?P<seo>.+?)(?:$|[#\?])
|
|
||||||
'''
|
|
||||||
_TESTS = [{
|
|
||||||
'url': 'http://www.cliphunter.com/w/1012420/Fun_Jynx_Maze_solo',
|
|
||||||
'md5': 'b7c9bbd4eb3a226ab91093714dcaa480',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '1012420',
|
|
||||||
'ext': 'flv',
|
|
||||||
'title': 'Fun Jynx Maze solo',
|
|
||||||
'thumbnail': r're:^https?://.*\.jpg$',
|
|
||||||
'age_limit': 18,
|
|
||||||
},
|
|
||||||
'skip': 'Video gone',
|
|
||||||
}, {
|
|
||||||
'url': 'http://www.cliphunter.com/w/2019449/ShesNew__My_booty_girlfriend_Victoria_Paradices_pussy_filled_with_jizz',
|
|
||||||
'md5': '55a723c67bfc6da6b0cfa00d55da8a27',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '2019449',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'ShesNew - My booty girlfriend, Victoria Paradice\'s pussy filled with jizz',
|
|
||||||
'thumbnail': r're:^https?://.*\.jpg$',
|
|
||||||
'age_limit': 18,
|
|
||||||
},
|
|
||||||
}]
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
video_id = self._match_id(url)
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
|
||||||
|
|
||||||
video_title = self._search_regex(
|
|
||||||
r'mediaTitle = "([^"]+)"', webpage, 'title')
|
|
||||||
|
|
||||||
gexo_files = self._parse_json(
|
|
||||||
self._search_regex(
|
|
||||||
r'var\s+gexoFiles\s*=\s*({.+?});', webpage, 'gexo files'),
|
|
||||||
video_id)
|
|
||||||
|
|
||||||
formats = []
|
|
||||||
for format_id, f in gexo_files.items():
|
|
||||||
video_url = url_or_none(f.get('url'))
|
|
||||||
if not video_url:
|
|
||||||
continue
|
|
||||||
fmt = f.get('fmt')
|
|
||||||
height = f.get('h')
|
|
||||||
format_id = '%s_%sp' % (fmt, height) if fmt and height else format_id
|
|
||||||
formats.append({
|
|
||||||
'url': video_url,
|
|
||||||
'format_id': format_id,
|
|
||||||
'width': int_or_none(f.get('w')),
|
|
||||||
'height': int_or_none(height),
|
|
||||||
'tbr': int_or_none(f.get('br')),
|
|
||||||
})
|
|
||||||
|
|
||||||
thumbnail = self._search_regex(
|
|
||||||
r"var\s+mov_thumb\s*=\s*'([^']+)';",
|
|
||||||
webpage, 'thumbnail', fatal=False)
|
|
||||||
|
|
||||||
return {
|
|
||||||
'id': video_id,
|
|
||||||
'title': video_title,
|
|
||||||
'formats': formats,
|
|
||||||
'age_limit': self._rta_search(webpage),
|
|
||||||
'thumbnail': thumbnail,
|
|
||||||
}
|
|
@ -1,54 +0,0 @@
|
|||||||
from .common import InfoExtractor
|
|
||||||
from ..utils import js_to_json
|
|
||||||
|
|
||||||
|
|
||||||
class DiggIE(InfoExtractor):
|
|
||||||
_VALID_URL = r'https?://(?:www\.)?digg\.com/video/(?P<id>[^/?#&]+)'
|
|
||||||
_TESTS = [{
|
|
||||||
# JWPlatform via provider
|
|
||||||
'url': 'http://digg.com/video/sci-fi-short-jonah-daniel-kaluuya-get-out',
|
|
||||||
'info_dict': {
|
|
||||||
'id': 'LcqvmS0b',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': "'Get Out' Star Daniel Kaluuya Goes On 'Moby Dick'-Like Journey In Sci-Fi Short 'Jonah'",
|
|
||||||
'description': 'md5:541bb847648b6ee3d6514bc84b82efda',
|
|
||||||
'upload_date': '20180109',
|
|
||||||
'timestamp': 1515530551,
|
|
||||||
},
|
|
||||||
'params': {
|
|
||||||
'skip_download': True,
|
|
||||||
},
|
|
||||||
}, {
|
|
||||||
# Youtube via provider
|
|
||||||
'url': 'http://digg.com/video/dog-boat-seal-play',
|
|
||||||
'only_matching': True,
|
|
||||||
}, {
|
|
||||||
# vimeo as regular embed
|
|
||||||
'url': 'http://digg.com/video/dream-girl-short-film',
|
|
||||||
'only_matching': True,
|
|
||||||
}]
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
display_id = self._match_id(url)
|
|
||||||
|
|
||||||
webpage = self._download_webpage(url, display_id)
|
|
||||||
|
|
||||||
info = self._parse_json(
|
|
||||||
self._search_regex(
|
|
||||||
r'(?s)video_info\s*=\s*({.+?});\n', webpage, 'video info',
|
|
||||||
default='{}'), display_id, transform_source=js_to_json,
|
|
||||||
fatal=False)
|
|
||||||
|
|
||||||
video_id = info.get('video_id')
|
|
||||||
|
|
||||||
if video_id:
|
|
||||||
provider = info.get('provider_name')
|
|
||||||
if provider == 'youtube':
|
|
||||||
return self.url_result(
|
|
||||||
video_id, ie='Youtube', video_id=video_id)
|
|
||||||
elif provider == 'jwplayer':
|
|
||||||
return self.url_result(
|
|
||||||
'jwplatform:%s' % video_id, ie='JWPlatform',
|
|
||||||
video_id=video_id)
|
|
||||||
|
|
||||||
return self.url_result(url, 'Generic')
|
|
@ -1,69 +0,0 @@
|
|||||||
from .common import InfoExtractor
|
|
||||||
from ..utils import int_or_none
|
|
||||||
|
|
||||||
|
|
||||||
class FilmmoduIE(InfoExtractor):
|
|
||||||
_VALID_URL = r'https?://(?:www\.)?filmmodu\.org/(?P<id>[^/]+-(?:turkce-dublaj-izle|altyazili-izle))'
|
|
||||||
_TESTS = [{
|
|
||||||
'url': 'https://www.filmmodu.org/f9-altyazili-izle',
|
|
||||||
'md5': 'aeefd955c2a508a5bdaa3bcec8eeb0d4',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '10804',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'F9',
|
|
||||||
'description': 'md5:2713f584a4d65afa2611e2948d0b953c',
|
|
||||||
'subtitles': {
|
|
||||||
'tr': [{
|
|
||||||
'ext': 'vtt',
|
|
||||||
}],
|
|
||||||
},
|
|
||||||
'thumbnail': r're:https://s[0-9]+.filmmodu.org/uploads/movie/cover/10804/xXHZeb1yhJvnSHPzZDqee0zfMb6.jpg',
|
|
||||||
},
|
|
||||||
}, {
|
|
||||||
'url': 'https://www.filmmodu.org/the-godfather-turkce-dublaj-izle',
|
|
||||||
'md5': '109f2fcb9c941330eed133971c035c00',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '3646',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'Baba',
|
|
||||||
'description': 'md5:d43fd651937cd75cc650883ebd8d8461',
|
|
||||||
'thumbnail': r're:https://s[0-9]+.filmmodu.org/uploads/movie/cover/3646/6xKCYgH16UuwEGAyroLU6p8HLIn.jpg',
|
|
||||||
},
|
|
||||||
}]
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
video_id = self._match_id(url)
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
|
||||||
title = self._og_search_title(webpage, fatal=True)
|
|
||||||
description = self._og_search_description(webpage)
|
|
||||||
thumbnail = self._og_search_thumbnail(webpage)
|
|
||||||
real_video_id = self._search_regex(r'var\s*videoId\s*=\s*\'([0-9]+)\'', webpage, 'video_id')
|
|
||||||
video_type = self._search_regex(r'var\s*videoType\s*=\s*\'([a-z]+)\'', webpage, 'video_type')
|
|
||||||
data = self._download_json('https://www.filmmodu.org/get-source', real_video_id, query={
|
|
||||||
'movie_id': real_video_id,
|
|
||||||
'type': video_type,
|
|
||||||
})
|
|
||||||
formats = [{
|
|
||||||
'url': source['src'],
|
|
||||||
'ext': 'mp4',
|
|
||||||
'format_id': source['label'],
|
|
||||||
'height': int_or_none(source.get('res')),
|
|
||||||
'protocol': 'm3u8_native',
|
|
||||||
} for source in data['sources']]
|
|
||||||
|
|
||||||
subtitles = {}
|
|
||||||
|
|
||||||
if data.get('subtitle'):
|
|
||||||
subtitles['tr'] = [{
|
|
||||||
'url': data['subtitle'],
|
|
||||||
}]
|
|
||||||
|
|
||||||
return {
|
|
||||||
'id': real_video_id,
|
|
||||||
'display_id': video_id,
|
|
||||||
'title': title,
|
|
||||||
'description': description,
|
|
||||||
'formats': formats,
|
|
||||||
'subtitles': subtitles,
|
|
||||||
'thumbnail': thumbnail,
|
|
||||||
}
|
|
@ -1,66 +0,0 @@
|
|||||||
from .common import InfoExtractor
|
|
||||||
from ..utils import (
|
|
||||||
ExtractorError,
|
|
||||||
join_nonempty,
|
|
||||||
traverse_obj,
|
|
||||||
unified_timestamp,
|
|
||||||
update_url_query,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class Kanal2IE(InfoExtractor):
|
|
||||||
_VALID_URL = r'https?://kanal2\.postimees\.ee/[^?#]+\?([^#]+&)?id=(?P<id>\d+)'
|
|
||||||
_TESTS = [{
|
|
||||||
'note': 'Test standard url (#5575)',
|
|
||||||
'url': 'https://kanal2.postimees.ee/pluss/video/?id=40792',
|
|
||||||
'md5': '7ea7b16266ec1798743777df241883dd',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '40792',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'Aedniku aabits / Osa 53 (05.08.2016 20:00)',
|
|
||||||
'thumbnail': r're:https?://.*\.jpg$',
|
|
||||||
'description': 'md5:53cabf3c5d73150d594747f727431248',
|
|
||||||
'upload_date': '20160805',
|
|
||||||
'timestamp': 1470420000,
|
|
||||||
},
|
|
||||||
}]
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
video_id = self._match_id(url)
|
|
||||||
playlist = self._download_json(
|
|
||||||
f'https://kanal2.postimees.ee/player/playlist/{video_id}',
|
|
||||||
video_id, query={'type': 'episodes'},
|
|
||||||
headers={'X-Requested-With': 'XMLHttpRequest'})
|
|
||||||
|
|
||||||
return {
|
|
||||||
'id': video_id,
|
|
||||||
'title': join_nonempty(*traverse_obj(playlist, ('info', ('title', 'subtitle'))), delim=' / '),
|
|
||||||
'description': traverse_obj(playlist, ('info', 'description')),
|
|
||||||
'thumbnail': traverse_obj(playlist, ('data', 'image')),
|
|
||||||
'formats': self.get_formats(playlist, video_id),
|
|
||||||
'timestamp': unified_timestamp(self._search_regex(
|
|
||||||
r'\((\d{2}\.\d{2}\.\d{4}\s\d{2}:\d{2})\)$',
|
|
||||||
traverse_obj(playlist, ('info', 'subtitle')), 'timestamp', default='') + ' +0200'),
|
|
||||||
}
|
|
||||||
|
|
||||||
def get_formats(self, playlist, video_id):
|
|
||||||
path = traverse_obj(playlist, ('data', 'path'))
|
|
||||||
if not path:
|
|
||||||
raise ExtractorError('Path value not found in playlist JSON response')
|
|
||||||
session = self._download_json(
|
|
||||||
'https://sts.postimees.ee/session/register',
|
|
||||||
video_id, note='Creating session', errnote='Error creating session',
|
|
||||||
headers={
|
|
||||||
'X-Original-URI': path,
|
|
||||||
'Accept': 'application/json',
|
|
||||||
})
|
|
||||||
if session.get('reason') != 'OK' or not session.get('session'):
|
|
||||||
reason = session.get('reason', 'unknown error')
|
|
||||||
raise ExtractorError(f'Unable to obtain session: {reason}')
|
|
||||||
|
|
||||||
formats = []
|
|
||||||
for stream in traverse_obj(playlist, ('data', 'streams', ..., 'file')):
|
|
||||||
formats.extend(self._extract_m3u8_formats(
|
|
||||||
update_url_query(stream, {'s': session['session']}), video_id, 'mp4'))
|
|
||||||
|
|
||||||
return formats
|
|
@ -1,96 +0,0 @@
|
|||||||
from .common import InfoExtractor
|
|
||||||
from ..compat import compat_urlparse
|
|
||||||
from ..utils import (
|
|
||||||
fix_xml_ampersands,
|
|
||||||
float_or_none,
|
|
||||||
xpath_with_ns,
|
|
||||||
xpath_text,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class KarriereVideosIE(InfoExtractor):
|
|
||||||
_VALID_URL = r'https?://(?:www\.)?karrierevideos\.at(?:/[^/]+)+/(?P<id>[^/]+)'
|
|
||||||
_TESTS = [{
|
|
||||||
'url': 'http://www.karrierevideos.at/berufsvideos/mittlere-hoehere-schulen/altenpflegerin',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '32c91',
|
|
||||||
'ext': 'flv',
|
|
||||||
'title': 'AltenpflegerIn',
|
|
||||||
'description': 'md5:dbadd1259fde2159a9b28667cb664ae2',
|
|
||||||
'thumbnail': r're:^http://.*\.png',
|
|
||||||
},
|
|
||||||
'params': {
|
|
||||||
# rtmp download
|
|
||||||
'skip_download': True,
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
# broken ampersands
|
|
||||||
'url': 'http://www.karrierevideos.at/orientierung/vaeterkarenz-und-neue-chancen-fuer-muetter-baby-was-nun',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '5sniu',
|
|
||||||
'ext': 'flv',
|
|
||||||
'title': 'Väterkarenz und neue Chancen für Mütter - "Baby - was nun?"',
|
|
||||||
'description': 'md5:97092c6ad1fd7d38e9d6a5fdeb2bcc33',
|
|
||||||
'thumbnail': r're:^http://.*\.png',
|
|
||||||
},
|
|
||||||
'params': {
|
|
||||||
# rtmp download
|
|
||||||
'skip_download': True,
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
video_id = self._match_id(url)
|
|
||||||
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
|
||||||
|
|
||||||
title = (self._html_search_meta('title', webpage, default=None)
|
|
||||||
or self._search_regex(r'<h1 class="title">([^<]+)</h1>', webpage, 'video title'))
|
|
||||||
|
|
||||||
video_id = self._search_regex(
|
|
||||||
r'/config/video/(.+?)\.xml', webpage, 'video id')
|
|
||||||
# Server returns malformed headers
|
|
||||||
# Force Accept-Encoding: * to prevent gzipped results
|
|
||||||
playlist = self._download_xml(
|
|
||||||
'http://www.karrierevideos.at/player-playlist.xml.php?p=%s' % video_id,
|
|
||||||
video_id, transform_source=fix_xml_ampersands,
|
|
||||||
headers={'Accept-Encoding': '*'})
|
|
||||||
|
|
||||||
NS_MAP = {
|
|
||||||
'jwplayer': 'http://developer.longtailvideo.com/trac/wiki/FlashFormats'
|
|
||||||
}
|
|
||||||
|
|
||||||
def ns(path):
|
|
||||||
return xpath_with_ns(path, NS_MAP)
|
|
||||||
|
|
||||||
item = playlist.find('./tracklist/item')
|
|
||||||
video_file = xpath_text(
|
|
||||||
item, ns('./jwplayer:file'), 'video url', fatal=True)
|
|
||||||
streamer = xpath_text(
|
|
||||||
item, ns('./jwplayer:streamer'), 'streamer', fatal=True)
|
|
||||||
|
|
||||||
uploader = xpath_text(
|
|
||||||
item, ns('./jwplayer:author'), 'uploader')
|
|
||||||
duration = float_or_none(
|
|
||||||
xpath_text(item, ns('./jwplayer:duration'), 'duration'))
|
|
||||||
|
|
||||||
description = self._html_search_regex(
|
|
||||||
r'(?s)<div class="leadtext">(.+?)</div>',
|
|
||||||
webpage, 'description')
|
|
||||||
|
|
||||||
thumbnail = self._html_search_meta(
|
|
||||||
'thumbnail', webpage, 'thumbnail')
|
|
||||||
if thumbnail:
|
|
||||||
thumbnail = compat_urlparse.urljoin(url, thumbnail)
|
|
||||||
|
|
||||||
return {
|
|
||||||
'id': video_id,
|
|
||||||
'url': streamer.replace('rtmpt', 'rtmp'),
|
|
||||||
'play_path': 'mp4:%s' % video_file,
|
|
||||||
'ext': 'flv',
|
|
||||||
'title': title,
|
|
||||||
'description': description,
|
|
||||||
'thumbnail': thumbnail,
|
|
||||||
'uploader': uploader,
|
|
||||||
'duration': duration,
|
|
||||||
}
|
|
@ -1,119 +0,0 @@
|
|||||||
from .common import InfoExtractor
|
|
||||||
from ..utils import (
|
|
||||||
determine_ext,
|
|
||||||
float_or_none,
|
|
||||||
int_or_none,
|
|
||||||
url_or_none,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class KonserthusetPlayIE(InfoExtractor):
|
|
||||||
_VALID_URL = r'https?://(?:www\.)?(?:konserthusetplay|rspoplay)\.se/\?.*\bm=(?P<id>[^&]+)'
|
|
||||||
_TESTS = [{
|
|
||||||
'url': 'http://www.konserthusetplay.se/?m=CKDDnlCY-dhWAAqiMERd-A',
|
|
||||||
'md5': 'e3fd47bf44e864bd23c08e487abe1967',
|
|
||||||
'info_dict': {
|
|
||||||
'id': 'CKDDnlCY-dhWAAqiMERd-A',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'Orkesterns instrument: Valthornen',
|
|
||||||
'description': 'md5:f10e1f0030202020396a4d712d2fa827',
|
|
||||||
'thumbnail': 're:^https?://.*$',
|
|
||||||
'duration': 398.76,
|
|
||||||
},
|
|
||||||
}, {
|
|
||||||
'url': 'http://rspoplay.se/?m=elWuEH34SMKvaO4wO_cHBw',
|
|
||||||
'only_matching': True,
|
|
||||||
}]
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
video_id = self._match_id(url)
|
|
||||||
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
|
||||||
|
|
||||||
e = self._search_regex(
|
|
||||||
r'https?://csp\.picsearch\.com/rest\?.*\be=(.+?)[&"\']', webpage, 'e')
|
|
||||||
|
|
||||||
rest = self._download_json(
|
|
||||||
'http://csp.picsearch.com/rest?e=%s&containerId=mediaplayer&i=object' % e,
|
|
||||||
video_id, transform_source=lambda s: s[s.index('{'):s.rindex('}') + 1])
|
|
||||||
|
|
||||||
media = rest['media']
|
|
||||||
player_config = media['playerconfig']
|
|
||||||
playlist = player_config['playlist']
|
|
||||||
|
|
||||||
source = next(f for f in playlist if f.get('bitrates') or f.get('provider'))
|
|
||||||
|
|
||||||
FORMAT_ID_REGEX = r'_([^_]+)_h264m\.mp4'
|
|
||||||
|
|
||||||
formats = []
|
|
||||||
|
|
||||||
m3u8_url = source.get('url')
|
|
||||||
if m3u8_url and determine_ext(m3u8_url) == 'm3u8':
|
|
||||||
formats.extend(self._extract_m3u8_formats(
|
|
||||||
m3u8_url, video_id, 'mp4', entry_protocol='m3u8_native',
|
|
||||||
m3u8_id='hls', fatal=False))
|
|
||||||
|
|
||||||
fallback_url = source.get('fallbackUrl')
|
|
||||||
fallback_format_id = None
|
|
||||||
if fallback_url:
|
|
||||||
fallback_format_id = self._search_regex(
|
|
||||||
FORMAT_ID_REGEX, fallback_url, 'format id', default=None)
|
|
||||||
|
|
||||||
connection_url = (player_config.get('rtmp', {}).get(
|
|
||||||
'netConnectionUrl') or player_config.get(
|
|
||||||
'plugins', {}).get('bwcheck', {}).get('netConnectionUrl'))
|
|
||||||
if connection_url:
|
|
||||||
for f in source['bitrates']:
|
|
||||||
video_url = f.get('url')
|
|
||||||
if not video_url:
|
|
||||||
continue
|
|
||||||
format_id = self._search_regex(
|
|
||||||
FORMAT_ID_REGEX, video_url, 'format id', default=None)
|
|
||||||
f_common = {
|
|
||||||
'vbr': int_or_none(f.get('bitrate')),
|
|
||||||
'width': int_or_none(f.get('width')),
|
|
||||||
'height': int_or_none(f.get('height')),
|
|
||||||
}
|
|
||||||
f = f_common.copy()
|
|
||||||
f.update({
|
|
||||||
'url': connection_url,
|
|
||||||
'play_path': video_url,
|
|
||||||
'format_id': 'rtmp-%s' % format_id if format_id else 'rtmp',
|
|
||||||
'ext': 'flv',
|
|
||||||
})
|
|
||||||
formats.append(f)
|
|
||||||
if format_id and format_id == fallback_format_id:
|
|
||||||
f = f_common.copy()
|
|
||||||
f.update({
|
|
||||||
'url': fallback_url,
|
|
||||||
'format_id': 'http-%s' % format_id if format_id else 'http',
|
|
||||||
})
|
|
||||||
formats.append(f)
|
|
||||||
|
|
||||||
if not formats and fallback_url:
|
|
||||||
formats.append({
|
|
||||||
'url': fallback_url,
|
|
||||||
})
|
|
||||||
|
|
||||||
title = player_config.get('title') or media['title']
|
|
||||||
description = player_config.get('mediaInfo', {}).get('description')
|
|
||||||
thumbnail = media.get('image')
|
|
||||||
duration = float_or_none(media.get('duration'), 1000)
|
|
||||||
|
|
||||||
subtitles = {}
|
|
||||||
captions = source.get('captionsAvailableLanguages')
|
|
||||||
if isinstance(captions, dict):
|
|
||||||
for lang, subtitle_url in captions.items():
|
|
||||||
subtitle_url = url_or_none(subtitle_url)
|
|
||||||
if lang != 'none' and subtitle_url:
|
|
||||||
subtitles.setdefault(lang, []).append({'url': subtitle_url})
|
|
||||||
|
|
||||||
return {
|
|
||||||
'id': video_id,
|
|
||||||
'title': title,
|
|
||||||
'description': description,
|
|
||||||
'thumbnail': thumbnail,
|
|
||||||
'duration': duration,
|
|
||||||
'formats': formats,
|
|
||||||
'subtitles': subtitles,
|
|
||||||
}
|
|
@ -1,83 +0,0 @@
|
|||||||
import random
|
|
||||||
import urllib.parse
|
|
||||||
|
|
||||||
from .common import InfoExtractor
|
|
||||||
from ..utils import (
|
|
||||||
float_or_none,
|
|
||||||
int_or_none,
|
|
||||||
timeconvert,
|
|
||||||
update_url_query,
|
|
||||||
xpath_text,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class KUSIIE(InfoExtractor):
|
|
||||||
_VALID_URL = r'https?://(?:www\.)?kusi\.com/(?P<path>story/.+|video\?clipId=(?P<clipId>\d+))'
|
|
||||||
_TESTS = [{
|
|
||||||
'url': 'http://www.kusi.com/story/32849881/turko-files-refused-to-help-it-aint-right',
|
|
||||||
'md5': '4e76ce8e53660ce9697d06c0ba6fc47d',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '12689020',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': "Turko Files: Refused to Help, It Ain't Right!",
|
|
||||||
'duration': 223.586,
|
|
||||||
'upload_date': '20160826',
|
|
||||||
'timestamp': 1472233118,
|
|
||||||
'thumbnail': r're:^https?://.*\.jpg$'
|
|
||||||
},
|
|
||||||
}, {
|
|
||||||
'url': 'http://kusi.com/video?clipId=12203019',
|
|
||||||
'only_matching': True,
|
|
||||||
}]
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
mobj = self._match_valid_url(url)
|
|
||||||
clip_id = mobj.group('clipId')
|
|
||||||
video_id = clip_id or mobj.group('path')
|
|
||||||
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
|
||||||
|
|
||||||
if clip_id is None:
|
|
||||||
video_id = clip_id = self._html_search_regex(
|
|
||||||
r'"clipId"\s*,\s*"(\d+)"', webpage, 'clip id')
|
|
||||||
|
|
||||||
affiliate_id = self._search_regex(
|
|
||||||
r'affiliateId\s*:\s*\'([^\']+)\'', webpage, 'affiliate id')
|
|
||||||
|
|
||||||
# See __Packages/worldnow/model/GalleryModel.as of WNGallery.swf
|
|
||||||
xml_url = update_url_query('http://www.kusi.com/build.asp', {
|
|
||||||
'buildtype': 'buildfeaturexmlrequest',
|
|
||||||
'featureType': 'Clip',
|
|
||||||
'featureid': clip_id,
|
|
||||||
'affiliateno': affiliate_id,
|
|
||||||
'clientgroupid': '1',
|
|
||||||
'rnd': int(round(random.random() * 1000000)),
|
|
||||||
})
|
|
||||||
|
|
||||||
doc = self._download_xml(xml_url, video_id)
|
|
||||||
|
|
||||||
video_title = xpath_text(doc, 'HEADLINE', fatal=True)
|
|
||||||
duration = float_or_none(xpath_text(doc, 'DURATION'), scale=1000)
|
|
||||||
description = xpath_text(doc, 'ABSTRACT')
|
|
||||||
thumbnail = xpath_text(doc, './THUMBNAILIMAGE/FILENAME')
|
|
||||||
creation_time = timeconvert(xpath_text(doc, 'rfc822creationdate'))
|
|
||||||
|
|
||||||
quality_options = doc.find('{http://search.yahoo.com/mrss/}group').findall('{http://search.yahoo.com/mrss/}content')
|
|
||||||
formats = []
|
|
||||||
for quality in quality_options:
|
|
||||||
formats.append({
|
|
||||||
'url': urllib.parse.unquote_plus(quality.attrib['url']),
|
|
||||||
'height': int_or_none(quality.attrib.get('height')),
|
|
||||||
'width': int_or_none(quality.attrib.get('width')),
|
|
||||||
'vbr': float_or_none(quality.attrib.get('bitratebits'), scale=1000),
|
|
||||||
})
|
|
||||||
|
|
||||||
return {
|
|
||||||
'id': video_id,
|
|
||||||
'title': video_title,
|
|
||||||
'description': description,
|
|
||||||
'duration': duration,
|
|
||||||
'formats': formats,
|
|
||||||
'thumbnail': thumbnail,
|
|
||||||
'timestamp': creation_time,
|
|
||||||
}
|
|
@ -1,42 +0,0 @@
|
|||||||
from .common import InfoExtractor
|
|
||||||
|
|
||||||
|
|
||||||
class LocalNews8IE(InfoExtractor):
|
|
||||||
_VALID_URL = r'https?://(?:www\.)?localnews8\.com/(?:[^/]+/)*(?P<display_id>[^/]+)/(?P<id>[0-9]+)'
|
|
||||||
_TEST = {
|
|
||||||
'url': 'http://www.localnews8.com/news/rexburg-business-turns-carbon-fiber-scraps-into-wedding-rings/35183304',
|
|
||||||
'md5': 'be4d48aea61aa2bde7be2ee47691ad20',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '35183304',
|
|
||||||
'display_id': 'rexburg-business-turns-carbon-fiber-scraps-into-wedding-rings',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'Rexburg business turns carbon fiber scraps into wedding ring',
|
|
||||||
'description': 'The process was first invented by Lamborghini and less than a dozen companies around the world use it.',
|
|
||||||
'duration': 153,
|
|
||||||
'timestamp': 1441844822,
|
|
||||||
'upload_date': '20150910',
|
|
||||||
'uploader_id': 'api',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
mobj = self._match_valid_url(url)
|
|
||||||
video_id = mobj.group('id')
|
|
||||||
display_id = mobj.group('display_id')
|
|
||||||
|
|
||||||
webpage = self._download_webpage(url, display_id)
|
|
||||||
|
|
||||||
partner_id = self._search_regex(
|
|
||||||
r'partnerId\s*[:=]\s*(["\'])(?P<id>\d+)\1',
|
|
||||||
webpage, 'partner id', group='id')
|
|
||||||
kaltura_id = self._search_regex(
|
|
||||||
r'videoIdString\s*[:=]\s*(["\'])kaltura:(?P<id>[0-9a-z_]+)\1',
|
|
||||||
webpage, 'videl id', group='id')
|
|
||||||
|
|
||||||
return {
|
|
||||||
'_type': 'url_transparent',
|
|
||||||
'url': 'kaltura:%s:%s' % (partner_id, kaltura_id),
|
|
||||||
'ie_key': 'Kaltura',
|
|
||||||
'id': video_id,
|
|
||||||
'display_id': display_id,
|
|
||||||
}
|
|
@ -1,107 +0,0 @@
|
|||||||
from .common import InfoExtractor
|
|
||||||
from ..utils import (
|
|
||||||
clean_html,
|
|
||||||
dict_get,
|
|
||||||
float_or_none,
|
|
||||||
int_or_none,
|
|
||||||
merge_dicts,
|
|
||||||
parse_duration,
|
|
||||||
try_get,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class MallTVIE(InfoExtractor):
|
|
||||||
_VALID_URL = r'https?://(?:(?:www|sk)\.)?mall\.tv/(?:[^/]+/)*(?P<id>[^/?#&]+)'
|
|
||||||
_TESTS = [{
|
|
||||||
'url': 'https://www.mall.tv/18-miliard-pro-neziskovky-opravdu-jsou-sportovci-nebo-clovek-v-tisni-pijavice',
|
|
||||||
'md5': 'cd69ce29176f6533b65bff69ed9a5f2a',
|
|
||||||
'info_dict': {
|
|
||||||
'id': 't0zzt0',
|
|
||||||
'display_id': '18-miliard-pro-neziskovky-opravdu-jsou-sportovci-nebo-clovek-v-tisni-pijavice',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': '18 miliard pro neziskovky. Opravdu jsou sportovci nebo Člověk v tísni pijavice?',
|
|
||||||
'description': 'md5:db7d5744a4bd4043d9d98324aa72ab35',
|
|
||||||
'duration': 216,
|
|
||||||
'timestamp': 1538870400,
|
|
||||||
'upload_date': '20181007',
|
|
||||||
'view_count': int,
|
|
||||||
'comment_count': int,
|
|
||||||
'thumbnail': 'https://cdn.vpplayer.tech/agmipnzv/encode/vjsnigfq/thumbnails/retina.jpg',
|
|
||||||
'average_rating': 9.060869565217391,
|
|
||||||
'dislike_count': int,
|
|
||||||
'like_count': int,
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
'url': 'https://www.mall.tv/kdo-to-plati/18-miliard-pro-neziskovky-opravdu-jsou-sportovci-nebo-clovek-v-tisni-pijavice',
|
|
||||||
'only_matching': True,
|
|
||||||
}, {
|
|
||||||
'url': 'https://sk.mall.tv/gejmhaus/reklamacia-nehreje-vyrobnik-tepla-alebo-spekacka',
|
|
||||||
'only_matching': True,
|
|
||||||
}, {
|
|
||||||
'url': 'https://www.mall.tv/zivoty-slavnych/nadeje-vychodu-i-zapadu-jak-michail-gorbacov-zmenil-politickou-mapu-sveta-a-ziskal-za-to-nobelovu-cenu-miru',
|
|
||||||
'info_dict': {
|
|
||||||
'id': 'yx010y',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'dislike_count': int,
|
|
||||||
'description': 'md5:aee02bee5a8d072c6a8207b91d1905a9',
|
|
||||||
'thumbnail': 'https://cdn.vpplayer.tech/agmipnzv/encode/vjsnjdeu/thumbnails/retina.jpg',
|
|
||||||
'comment_count': int,
|
|
||||||
'display_id': 'md5:0ec2afa94d2e2b7091c019cef2a43a9b',
|
|
||||||
'like_count': int,
|
|
||||||
'duration': 752,
|
|
||||||
'timestamp': 1646956800,
|
|
||||||
'title': 'md5:fe79385daaf16d74c12c1ec4a26687af',
|
|
||||||
'view_count': int,
|
|
||||||
'upload_date': '20220311',
|
|
||||||
'average_rating': 9.685714285714285,
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
display_id = self._match_id(url)
|
|
||||||
|
|
||||||
webpage = self._download_webpage(
|
|
||||||
url, display_id, headers=self.geo_verification_headers())
|
|
||||||
|
|
||||||
video = self._parse_json(self._search_regex(
|
|
||||||
r'videoObject\s*=\s*JSON\.parse\(JSON\.stringify\(({.+?})\)\);',
|
|
||||||
webpage, 'video object'), display_id)
|
|
||||||
|
|
||||||
video_id = self._search_regex(
|
|
||||||
r'<input\s*id\s*=\s*player-id-name\s*[^>]+value\s*=\s*(\w+)', webpage, 'video id')
|
|
||||||
|
|
||||||
formats = self._extract_m3u8_formats(
|
|
||||||
video['VideoSource'], video_id, 'mp4', 'm3u8_native')
|
|
||||||
|
|
||||||
subtitles = {}
|
|
||||||
for s in (video.get('Subtitles') or {}):
|
|
||||||
s_url = s.get('Url')
|
|
||||||
if not s_url:
|
|
||||||
continue
|
|
||||||
subtitles.setdefault(s.get('Language') or 'cz', []).append({
|
|
||||||
'url': s_url,
|
|
||||||
})
|
|
||||||
|
|
||||||
entity_counts = video.get('EntityCounts') or {}
|
|
||||||
|
|
||||||
def get_count(k):
|
|
||||||
v = entity_counts.get(k + 's') or {}
|
|
||||||
return int_or_none(dict_get(v, ('Count', 'StrCount')))
|
|
||||||
|
|
||||||
info = self._search_json_ld(webpage, video_id, default={})
|
|
||||||
|
|
||||||
return merge_dicts({
|
|
||||||
'id': str(video_id),
|
|
||||||
'display_id': display_id,
|
|
||||||
'title': video.get('Title'),
|
|
||||||
'description': clean_html(video.get('Description')),
|
|
||||||
'thumbnail': video.get('ThumbnailUrl'),
|
|
||||||
'formats': formats,
|
|
||||||
'subtitles': subtitles,
|
|
||||||
'duration': int_or_none(video.get('DurationSeconds')) or parse_duration(video.get('Duration')),
|
|
||||||
'view_count': get_count('View'),
|
|
||||||
'like_count': get_count('Like'),
|
|
||||||
'dislike_count': get_count('Dislike'),
|
|
||||||
'average_rating': float_or_none(try_get(video, lambda x: x['EntityRating']['AvarageRate'])),
|
|
||||||
'comment_count': get_count('Comment'),
|
|
||||||
}, info)
|
|
@ -1,36 +0,0 @@
|
|||||||
from .common import InfoExtractor
|
|
||||||
|
|
||||||
|
|
||||||
class MiaoPaiIE(InfoExtractor):
|
|
||||||
_VALID_URL = r'https?://(?:www\.)?miaopai\.com/show/(?P<id>[-A-Za-z0-9~_]+)'
|
|
||||||
_TEST = {
|
|
||||||
'url': 'http://www.miaopai.com/show/n~0hO7sfV1nBEw4Y29-Hqg__.htm',
|
|
||||||
'md5': '095ed3f1cd96b821add957bdc29f845b',
|
|
||||||
'info_dict': {
|
|
||||||
'id': 'n~0hO7sfV1nBEw4Y29-Hqg__',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': '西游记音乐会的秒拍视频',
|
|
||||||
'thumbnail': 're:^https?://.*/n~0hO7sfV1nBEw4Y29-Hqg___m.jpg',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_USER_AGENT_IPAD = 'Mozilla/5.0 (iPad; CPU OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1'
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
video_id = self._match_id(url)
|
|
||||||
webpage = self._download_webpage(
|
|
||||||
url, video_id, headers={'User-Agent': self._USER_AGENT_IPAD})
|
|
||||||
|
|
||||||
title = self._html_extract_title(webpage)
|
|
||||||
thumbnail = self._html_search_regex(
|
|
||||||
r'<div[^>]+class=(?P<q1>[\'"]).*\bvideo_img\b.*(?P=q1)[^>]+data-url=(?P<q2>[\'"])(?P<url>[^\'"]+)(?P=q2)',
|
|
||||||
webpage, 'thumbnail', fatal=False, group='url')
|
|
||||||
videos = self._parse_html5_media_entries(url, webpage, video_id)
|
|
||||||
info = videos[0]
|
|
||||||
|
|
||||||
info.update({
|
|
||||||
'id': video_id,
|
|
||||||
'title': title,
|
|
||||||
'thumbnail': thumbnail,
|
|
||||||
})
|
|
||||||
return info
|
|
@ -1,55 +0,0 @@
|
|||||||
from .common import InfoExtractor
|
|
||||||
from ..utils import (
|
|
||||||
ExtractorError,
|
|
||||||
smuggle_url,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class MinistryGridIE(InfoExtractor):
|
|
||||||
_VALID_URL = r'https?://(?:www\.)?ministrygrid\.com/([^/?#]*/)*(?P<id>[^/#?]+)/?(?:$|[?#])'
|
|
||||||
|
|
||||||
_TEST = {
|
|
||||||
'url': 'http://www.ministrygrid.com/training-viewer/-/training/t4g-2014-conference/the-gospel-by-numbers-4/the-gospel-by-numbers',
|
|
||||||
'md5': '844be0d2a1340422759c2a9101bab017',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '3453494717001',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'The Gospel by Numbers',
|
|
||||||
'thumbnail': r're:^https?://.*\.jpg',
|
|
||||||
'upload_date': '20140410',
|
|
||||||
'description': 'Coming soon from T4G 2014!',
|
|
||||||
'uploader_id': '2034960640001',
|
|
||||||
'timestamp': 1397145591,
|
|
||||||
},
|
|
||||||
'params': {
|
|
||||||
# m3u8 download
|
|
||||||
'skip_download': True,
|
|
||||||
},
|
|
||||||
'add_ie': ['TDSLifeway'],
|
|
||||||
}
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
video_id = self._match_id(url)
|
|
||||||
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
|
||||||
portlets = self._parse_json(self._search_regex(
|
|
||||||
r'Liferay\.Portlet\.list=(\[.+?\])', webpage, 'portlet list'),
|
|
||||||
video_id)
|
|
||||||
pl_id = self._search_regex(
|
|
||||||
r'getPlid:function\(\){return"(\d+)"}', webpage, 'p_l_id')
|
|
||||||
|
|
||||||
for i, portlet in enumerate(portlets):
|
|
||||||
portlet_url = 'http://www.ministrygrid.com/c/portal/render_portlet?p_l_id=%s&p_p_id=%s' % (pl_id, portlet)
|
|
||||||
portlet_code = self._download_webpage(
|
|
||||||
portlet_url, video_id,
|
|
||||||
note='Looking in portlet %s (%d/%d)' % (portlet, i + 1, len(portlets)),
|
|
||||||
fatal=False)
|
|
||||||
video_iframe_url = self._search_regex(
|
|
||||||
r'<iframe.*?src="([^"]+)"', portlet_code, 'video iframe',
|
|
||||||
default=None)
|
|
||||||
if video_iframe_url:
|
|
||||||
return self.url_result(
|
|
||||||
smuggle_url(video_iframe_url, {'force_videoid': video_id}),
|
|
||||||
video_id=video_id)
|
|
||||||
|
|
||||||
raise ExtractorError('Could not find video iframe in any portlets')
|
|
@ -1,45 +0,0 @@
|
|||||||
from .common import InfoExtractor
|
|
||||||
|
|
||||||
|
|
||||||
class MorningstarIE(InfoExtractor):
|
|
||||||
IE_DESC = 'morningstar.com'
|
|
||||||
_VALID_URL = r'https?://(?:(?:www|news)\.)morningstar\.com/[cC]over/video[cC]enter\.aspx\?id=(?P<id>[0-9]+)'
|
|
||||||
_TESTS = [{
|
|
||||||
'url': 'http://www.morningstar.com/cover/videocenter.aspx?id=615869',
|
|
||||||
'md5': '6c0acface7a787aadc8391e4bbf7b0f5',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '615869',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'Get Ahead of the Curve on 2013 Taxes',
|
|
||||||
'description': "Vanguard's Joel Dickson on managing higher tax rates for high-income earners and fund capital-gain distributions in 2013.",
|
|
||||||
'thumbnail': r're:^https?://.*m(?:orning)?star\.com/.+thumb\.jpg$'
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
'url': 'http://news.morningstar.com/cover/videocenter.aspx?id=825556',
|
|
||||||
'only_matching': True,
|
|
||||||
}]
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
mobj = self._match_valid_url(url)
|
|
||||||
video_id = mobj.group('id')
|
|
||||||
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
|
||||||
title = self._html_search_regex(
|
|
||||||
r'<h1 id="titleLink">(.*?)</h1>', webpage, 'title')
|
|
||||||
video_url = self._html_search_regex(
|
|
||||||
r'<input type="hidden" id="hidVideoUrl" value="([^"]+)"',
|
|
||||||
webpage, 'video URL')
|
|
||||||
thumbnail = self._html_search_regex(
|
|
||||||
r'<input type="hidden" id="hidSnapshot" value="([^"]+)"',
|
|
||||||
webpage, 'thumbnail', fatal=False)
|
|
||||||
description = self._html_search_regex(
|
|
||||||
r'<div id="mstarDeck".*?>(.*?)</div>',
|
|
||||||
webpage, 'description', fatal=False)
|
|
||||||
|
|
||||||
return {
|
|
||||||
'id': video_id,
|
|
||||||
'title': title,
|
|
||||||
'url': video_url,
|
|
||||||
'thumbnail': thumbnail,
|
|
||||||
'description': description,
|
|
||||||
}
|
|
@ -1,63 +0,0 @@
|
|||||||
from .common import InfoExtractor
|
|
||||||
from ..compat import compat_str
|
|
||||||
from ..utils import (
|
|
||||||
smuggle_url,
|
|
||||||
try_get,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class PlayStuffIE(InfoExtractor):
|
|
||||||
_VALID_URL = r'https?://(?:www\.)?play\.stuff\.co\.nz/details/(?P<id>[^/?#&]+)'
|
|
||||||
_TESTS = [{
|
|
||||||
'url': 'https://play.stuff.co.nz/details/608778ac1de1c4001a3fa09a',
|
|
||||||
'md5': 'c82d3669e5247c64bc382577843e5bd0',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '6250584958001',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'Episode 1: Rotorua/Mt Maunganui/Tauranga',
|
|
||||||
'description': 'md5:c154bafb9f0dd02d01fd4100fb1c1913',
|
|
||||||
'uploader_id': '6005208634001',
|
|
||||||
'timestamp': 1619491027,
|
|
||||||
'upload_date': '20210427',
|
|
||||||
},
|
|
||||||
'add_ie': ['BrightcoveNew'],
|
|
||||||
}, {
|
|
||||||
# geo restricted, bypassable
|
|
||||||
'url': 'https://play.stuff.co.nz/details/_6155660351001',
|
|
||||||
'only_matching': True,
|
|
||||||
}]
|
|
||||||
BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/%s/%s_default/index.html?videoId=%s'
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
video_id = self._match_id(url)
|
|
||||||
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
|
||||||
|
|
||||||
state = self._parse_json(
|
|
||||||
self._search_regex(
|
|
||||||
r'__INITIAL_STATE__\s*=\s*({.+?})\s*;', webpage, 'state'),
|
|
||||||
video_id)
|
|
||||||
|
|
||||||
account_id = try_get(
|
|
||||||
state, lambda x: x['configurations']['accountId'],
|
|
||||||
compat_str) or '6005208634001'
|
|
||||||
player_id = try_get(
|
|
||||||
state, lambda x: x['configurations']['playerId'],
|
|
||||||
compat_str) or 'default'
|
|
||||||
|
|
||||||
entries = []
|
|
||||||
for item_id, video in state['items'].items():
|
|
||||||
if not isinstance(video, dict):
|
|
||||||
continue
|
|
||||||
asset_id = try_get(
|
|
||||||
video, lambda x: x['content']['attributes']['assetId'],
|
|
||||||
compat_str)
|
|
||||||
if not asset_id:
|
|
||||||
continue
|
|
||||||
entries.append(self.url_result(
|
|
||||||
smuggle_url(
|
|
||||||
self.BRIGHTCOVE_URL_TEMPLATE % (account_id, player_id, asset_id),
|
|
||||||
{'geo_countries': ['NZ']}),
|
|
||||||
'BrightcoveNew', video_id))
|
|
||||||
|
|
||||||
return self.playlist_result(entries, video_id)
|
|
@ -1,68 +0,0 @@
|
|||||||
from .common import InfoExtractor
|
|
||||||
from ..compat import compat_str
|
|
||||||
from ..utils import (
|
|
||||||
clean_html,
|
|
||||||
int_or_none,
|
|
||||||
unified_timestamp,
|
|
||||||
update_url_query,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class RBMARadioIE(InfoExtractor):
|
|
||||||
_VALID_URL = r'https?://(?:www\.)?(?:rbmaradio|redbullradio)\.com/shows/(?P<show_id>[^/]+)/episodes/(?P<id>[^/?#&]+)'
|
|
||||||
_TEST = {
|
|
||||||
'url': 'https://www.rbmaradio.com/shows/main-stage/episodes/ford-lopatin-live-at-primavera-sound-2011',
|
|
||||||
'md5': '6bc6f9bcb18994b4c983bc3bf4384d95',
|
|
||||||
'info_dict': {
|
|
||||||
'id': 'ford-lopatin-live-at-primavera-sound-2011',
|
|
||||||
'ext': 'mp3',
|
|
||||||
'title': 'Main Stage - Ford & Lopatin at Primavera Sound',
|
|
||||||
'description': 'md5:d41d8cd98f00b204e9800998ecf8427e',
|
|
||||||
'thumbnail': r're:^https?://.*\.jpg',
|
|
||||||
'duration': 2452,
|
|
||||||
'timestamp': 1307103164,
|
|
||||||
'upload_date': '20110603',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
mobj = self._match_valid_url(url)
|
|
||||||
show_id = mobj.group('show_id')
|
|
||||||
episode_id = mobj.group('id')
|
|
||||||
|
|
||||||
webpage = self._download_webpage(url, episode_id)
|
|
||||||
|
|
||||||
episode = self._parse_json(
|
|
||||||
self._search_regex(
|
|
||||||
r'__INITIAL_STATE__\s*=\s*({.+?})\s*</script>',
|
|
||||||
webpage, 'json data'),
|
|
||||||
episode_id)['episodes'][show_id][episode_id]
|
|
||||||
|
|
||||||
title = episode['title']
|
|
||||||
|
|
||||||
show_title = episode.get('showTitle')
|
|
||||||
if show_title:
|
|
||||||
title = '%s - %s' % (show_title, title)
|
|
||||||
|
|
||||||
formats = [{
|
|
||||||
'url': update_url_query(episode['audioURL'], query={'cbr': abr}),
|
|
||||||
'format_id': compat_str(abr),
|
|
||||||
'abr': abr,
|
|
||||||
'vcodec': 'none',
|
|
||||||
} for abr in (96, 128, 192, 256)]
|
|
||||||
self._check_formats(formats, episode_id)
|
|
||||||
|
|
||||||
description = clean_html(episode.get('longTeaser'))
|
|
||||||
thumbnail = self._proto_relative_url(episode.get('imageURL', {}).get('landscape'))
|
|
||||||
duration = int_or_none(episode.get('duration'))
|
|
||||||
timestamp = unified_timestamp(episode.get('publishedAt'))
|
|
||||||
|
|
||||||
return {
|
|
||||||
'id': episode_id,
|
|
||||||
'title': title,
|
|
||||||
'description': description,
|
|
||||||
'thumbnail': thumbnail,
|
|
||||||
'duration': duration,
|
|
||||||
'timestamp': timestamp,
|
|
||||||
'formats': formats,
|
|
||||||
}
|
|
@ -1,55 +0,0 @@
|
|||||||
from .common import InfoExtractor
|
|
||||||
from ..networking import Request
|
|
||||||
from ..utils import xpath_text, xpath_with_ns
|
|
||||||
|
|
||||||
|
|
||||||
class RegioTVIE(InfoExtractor):
|
|
||||||
_VALID_URL = r'https?://(?:www\.)?regio-tv\.de/video/(?P<id>[0-9]+)'
|
|
||||||
_TESTS = [{
|
|
||||||
'url': 'http://www.regio-tv.de/video/395808.html',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '395808',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'Wir in Ludwigsburg',
|
|
||||||
'description': 'Mit unseren zuckersüßen Adventskindern, außerdem besuchen wir die Abendsterne!',
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
'url': 'http://www.regio-tv.de/video/395808',
|
|
||||||
'only_matching': True,
|
|
||||||
}]
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
video_id = self._match_id(url)
|
|
||||||
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
|
||||||
|
|
||||||
key = self._search_regex(
|
|
||||||
r'key\s*:\s*(["\'])(?P<key>.+?)\1', webpage, 'key', group='key')
|
|
||||||
title = self._og_search_title(webpage)
|
|
||||||
|
|
||||||
SOAP_TEMPLATE = '<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><{0} xmlns="http://v.telvi.de/"><key xsi:type="xsd:string">{1}</key></{0}></soap:Body></soap:Envelope>'
|
|
||||||
|
|
||||||
request = Request(
|
|
||||||
'http://v.telvi.de/',
|
|
||||||
SOAP_TEMPLATE.format('GetHTML5VideoData', key).encode('utf-8'))
|
|
||||||
video_data = self._download_xml(request, video_id, 'Downloading video XML')
|
|
||||||
|
|
||||||
NS_MAP = {
|
|
||||||
'xsi': 'http://www.w3.org/2001/XMLSchema-instance',
|
|
||||||
'soap': 'http://schemas.xmlsoap.org/soap/envelope/',
|
|
||||||
}
|
|
||||||
|
|
||||||
video_url = xpath_text(
|
|
||||||
video_data, xpath_with_ns('.//video', NS_MAP), 'video url', fatal=True)
|
|
||||||
thumbnail = xpath_text(
|
|
||||||
video_data, xpath_with_ns('.//image', NS_MAP), 'thumbnail')
|
|
||||||
description = self._og_search_description(
|
|
||||||
webpage) or self._html_search_meta('description', webpage)
|
|
||||||
|
|
||||||
return {
|
|
||||||
'id': video_id,
|
|
||||||
'url': video_url,
|
|
||||||
'title': title,
|
|
||||||
'description': description,
|
|
||||||
'thumbnail': thumbnail,
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
import os.path
|
|
||||||
|
|
||||||
from .common import InfoExtractor
|
|
||||||
|
|
||||||
|
|
||||||
class SaveFromIE(InfoExtractor):
|
|
||||||
IE_NAME = 'savefrom.net'
|
|
||||||
_VALID_URL = r'https?://[^.]+\.savefrom\.net/\#url=(?P<url>.*)$'
|
|
||||||
|
|
||||||
_TEST = {
|
|
||||||
'url': 'http://en.savefrom.net/#url=http://youtube.com/watch?v=UlVRAPW2WJY&utm_source=youtube.com&utm_medium=short_domains&utm_campaign=ssyoutube.com',
|
|
||||||
'info_dict': {
|
|
||||||
'id': 'UlVRAPW2WJY',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'About Team Radical MMA | MMA Fighting',
|
|
||||||
'upload_date': '20120816',
|
|
||||||
'uploader': 'Howcast',
|
|
||||||
'uploader_id': 'Howcast',
|
|
||||||
'description': r're:(?s).* Hi, my name is Rene Dreifuss\. And I\'m here to show you some MMA.*',
|
|
||||||
},
|
|
||||||
'params': {
|
|
||||||
'skip_download': True
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
mobj = self._match_valid_url(url)
|
|
||||||
video_id = os.path.splitext(url.split('/')[-1])[0]
|
|
||||||
|
|
||||||
return self.url_result(mobj.group('url'), video_id=video_id)
|
|
@ -1,55 +0,0 @@
|
|||||||
import re
|
|
||||||
|
|
||||||
from .common import InfoExtractor
|
|
||||||
from ..utils import (
|
|
||||||
get_element_by_class,
|
|
||||||
strip_or_none,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class SeekerIE(InfoExtractor):
|
|
||||||
_VALID_URL = r'https?://(?:www\.)?seeker\.com/(?P<display_id>.*)-(?P<article_id>\d+)\.html'
|
|
||||||
_TESTS = [{
|
|
||||||
'url': 'http://www.seeker.com/should-trump-be-required-to-release-his-tax-returns-1833805621.html',
|
|
||||||
'md5': '897d44bbe0d8986a2ead96de565a92db',
|
|
||||||
'info_dict': {
|
|
||||||
'id': 'Elrn3gnY',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'Should Trump Be Required To Release His Tax Returns?',
|
|
||||||
'description': 'md5:41efa8cfa8d627841045eec7b018eb45',
|
|
||||||
'timestamp': 1490090165,
|
|
||||||
'upload_date': '20170321',
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
'url': 'http://www.seeker.com/changes-expected-at-zoos-following-recent-gorilla-lion-shootings-1834116536.html',
|
|
||||||
'playlist': [
|
|
||||||
{
|
|
||||||
'md5': '0497b9f20495174be73ae136949707d2',
|
|
||||||
'info_dict': {
|
|
||||||
'id': 'FihYQ8AE',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'The Pros & Cons Of Zoos',
|
|
||||||
'description': 'md5:d88f99a8ea8e7d25e6ff77f271b1271c',
|
|
||||||
'timestamp': 1490039133,
|
|
||||||
'upload_date': '20170320',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
],
|
|
||||||
'info_dict': {
|
|
||||||
'id': '1834116536',
|
|
||||||
'title': 'After Gorilla Killing, Changes Ahead for Zoos',
|
|
||||||
'description': 'The largest association of zoos and others are hoping to learn from recent incidents that led to the shooting deaths of a gorilla and two lions.',
|
|
||||||
},
|
|
||||||
}]
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
display_id, article_id = self._match_valid_url(url).groups()
|
|
||||||
webpage = self._download_webpage(url, display_id)
|
|
||||||
entries = []
|
|
||||||
for jwp_id in re.findall(r'data-video-id="([a-zA-Z0-9]{8})"', webpage):
|
|
||||||
entries.append(self.url_result(
|
|
||||||
'jwplatform:' + jwp_id, 'JWPlatform', jwp_id))
|
|
||||||
return self.playlist_result(
|
|
||||||
entries, article_id,
|
|
||||||
self._og_search_title(webpage),
|
|
||||||
strip_or_none(get_element_by_class('subtitle__text', webpage)) or self._og_search_description(webpage))
|
|
@ -1,30 +0,0 @@
|
|||||||
from .common import InfoExtractor
|
|
||||||
from ..utils import int_or_none, parse_iso8601
|
|
||||||
|
|
||||||
|
|
||||||
class StreamFFIE(InfoExtractor):
|
|
||||||
_VALID_URL = r'https?://(?:www\.)?streamff\.com/v/(?P<id>[a-zA-Z0-9]+)'
|
|
||||||
|
|
||||||
_TESTS = [{
|
|
||||||
'url': 'https://streamff.com/v/55cc94',
|
|
||||||
'md5': '8745a67bb5e5c570738efe7983826370',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '55cc94',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': '55cc94',
|
|
||||||
'timestamp': 1634764643,
|
|
||||||
'upload_date': '20211020',
|
|
||||||
'view_count': int,
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
video_id = self._match_id(url)
|
|
||||||
json_data = self._download_json(f'https://streamff.com/api/videos/{video_id}', video_id)
|
|
||||||
return {
|
|
||||||
'id': video_id,
|
|
||||||
'title': json_data.get('name') or video_id,
|
|
||||||
'url': 'https://streamff.com/%s' % json_data['videoLink'],
|
|
||||||
'view_count': int_or_none(json_data.get('views')),
|
|
||||||
'timestamp': parse_iso8601(json_data.get('date')),
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
from .common import InfoExtractor
|
|
||||||
|
|
||||||
|
|
||||||
class TDSLifewayIE(InfoExtractor):
|
|
||||||
_VALID_URL = r'https?://tds\.lifeway\.com/v1/trainingdeliverysystem/courses/(?P<id>\d+)/index\.html'
|
|
||||||
|
|
||||||
_TEST = {
|
|
||||||
# From http://www.ministrygrid.com/training-viewer/-/training/t4g-2014-conference/the-gospel-by-numbers-4/the-gospel-by-numbers
|
|
||||||
'url': 'http://tds.lifeway.com/v1/trainingdeliverysystem/courses/3453494717001/index.html?externalRegistration=AssetId%7C34F466F1-78F3-4619-B2AB-A8EFFA55E9E9%21InstanceId%7C0%21UserId%7Caaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa&grouping=http%3A%2F%2Flifeway.com%2Fvideo%2F3453494717001&activity_id=http%3A%2F%2Flifeway.com%2Fvideo%2F3453494717001&content_endpoint=http%3A%2F%2Ftds.lifeway.com%2Fv1%2Ftrainingdeliverysystem%2FScormEngineInterface%2FTCAPI%2Fcontent%2F&actor=%7B%22name%22%3A%5B%22Guest%20Guest%22%5D%2C%22account%22%3A%5B%7B%22accountServiceHomePage%22%3A%22http%3A%2F%2Fscorm.lifeway.com%2F%22%2C%22accountName%22%3A%22aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa%22%7D%5D%2C%22objectType%22%3A%22Agent%22%7D&content_token=462a50b2-b6f9-4970-99b1-930882c499fb®istration=93d6ec8e-7f7b-4ed3-bbc8-a857913c0b2a&externalConfiguration=access%7CFREE%21adLength%7C-1%21assignOrgId%7C4AE36F78-299A-425D-91EF-E14A899B725F%21assignOrgParentId%7C%21courseId%7C%21isAnonymous%7Cfalse%21previewAsset%7Cfalse%21previewLength%7C-1%21previewMode%7Cfalse%21royalty%7CFREE%21sessionId%7C671422F9-8E79-48D4-9C2C-4EE6111EA1CD%21trackId%7C&auth=Basic%20OjhmZjk5MDBmLTBlYTMtNDJhYS04YjFlLWE4MWQ3NGNkOGRjYw%3D%3D&endpoint=http%3A%2F%2Ftds.lifeway.com%2Fv1%2Ftrainingdeliverysystem%2FScormEngineInterface%2FTCAPI%2F',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '3453494717001',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'The Gospel by Numbers',
|
|
||||||
'thumbnail': r're:^https?://.*\.jpg',
|
|
||||||
'upload_date': '20140410',
|
|
||||||
'description': 'Coming soon from T4G 2014!',
|
|
||||||
'uploader_id': '2034960640001',
|
|
||||||
'timestamp': 1397145591,
|
|
||||||
},
|
|
||||||
'params': {
|
|
||||||
# m3u8 download
|
|
||||||
'skip_download': True,
|
|
||||||
},
|
|
||||||
'add_ie': ['BrightcoveNew'],
|
|
||||||
}
|
|
||||||
|
|
||||||
BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/2034960640001/default_default/index.html?videoId=%s'
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
brightcove_id = self._match_id(url)
|
|
||||||
return self.url_result(self.BRIGHTCOVE_URL_TEMPLATE % brightcove_id, 'BrightcoveNew', brightcove_id)
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue