mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-12-22 20:20:09 +09:00
[mychannels] add support for mychannels.com(closes #15334)
This commit is contained in:
parent
58a68d8fda
commit
1306f5ed72
@ -582,7 +582,6 @@ from .mailru import (
|
|||||||
MailRuMusicIE,
|
MailRuMusicIE,
|
||||||
MailRuMusicSearchIE,
|
MailRuMusicSearchIE,
|
||||||
)
|
)
|
||||||
from .makerschannel import MakersChannelIE
|
|
||||||
from .makertv import MakerTVIE
|
from .makertv import MakerTVIE
|
||||||
from .mangomolo import (
|
from .mangomolo import (
|
||||||
MangomoloVideoIE,
|
MangomoloVideoIE,
|
||||||
@ -645,6 +644,7 @@ from .mtv import (
|
|||||||
from .muenchentv import MuenchenTVIE
|
from .muenchentv import MuenchenTVIE
|
||||||
from .musicplayon import MusicPlayOnIE
|
from .musicplayon import MusicPlayOnIE
|
||||||
from .mwave import MwaveIE, MwaveMeetGreetIE
|
from .mwave import MwaveIE, MwaveMeetGreetIE
|
||||||
|
from .mychannels import MyChannelsIE
|
||||||
from .myspace import MySpaceIE, MySpaceAlbumIE
|
from .myspace import MySpaceIE, MySpaceAlbumIE
|
||||||
from .myspass import MySpassIE
|
from .myspass import MySpassIE
|
||||||
from .myvi import (
|
from .myvi import (
|
||||||
|
@ -4,7 +4,10 @@ from __future__ import unicode_literals
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import int_or_none
|
from ..utils import (
|
||||||
|
int_or_none,
|
||||||
|
parse_codecs,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class MinotoIE(InfoExtractor):
|
class MinotoIE(InfoExtractor):
|
||||||
@ -26,7 +29,7 @@ class MinotoIE(InfoExtractor):
|
|||||||
formats.extend(fmt_url, video_id, 'mp4', m3u8_id='hls', fatal=False)
|
formats.extend(fmt_url, video_id, 'mp4', m3u8_id='hls', fatal=False)
|
||||||
else:
|
else:
|
||||||
fmt_profile = fmt.get('profile') or {}
|
fmt_profile = fmt.get('profile') or {}
|
||||||
f = {
|
formats.append({
|
||||||
'format_id': fmt_profile.get('name-short'),
|
'format_id': fmt_profile.get('name-short'),
|
||||||
'format_note': fmt_profile.get('name'),
|
'format_note': fmt_profile.get('name'),
|
||||||
'url': fmt_url,
|
'url': fmt_url,
|
||||||
@ -35,16 +38,8 @@ class MinotoIE(InfoExtractor):
|
|||||||
'filesize': int_or_none(fmt.get('filesize')),
|
'filesize': int_or_none(fmt.get('filesize')),
|
||||||
'width': int_or_none(fmt.get('width')),
|
'width': int_or_none(fmt.get('width')),
|
||||||
'height': int_or_none(fmt.get('height')),
|
'height': int_or_none(fmt.get('height')),
|
||||||
}
|
'codecs': parse_codecs(fmt.get('codecs')),
|
||||||
codecs = fmt.get('codecs')
|
})
|
||||||
if codecs:
|
|
||||||
codecs = codecs.split(',')
|
|
||||||
if len(codecs) == 2:
|
|
||||||
f.update({
|
|
||||||
'vcodec': codecs[0],
|
|
||||||
'acodec': codecs[1],
|
|
||||||
})
|
|
||||||
formats.append(f)
|
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -6,17 +6,17 @@ import re
|
|||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
|
|
||||||
|
|
||||||
class MakersChannelIE(InfoExtractor):
|
class MyChannelsIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://(?:www\.)?makerschannel\.com/.*(?P<id_type>video|production)_id=(?P<id>[0-9]+)'
|
_VALID_URL = r'https?://(?:www\.)?mychannels\.com/.*(?P<id_type>video|production)_id=(?P<id>[0-9]+)'
|
||||||
_TEST = {
|
_TEST = {
|
||||||
'url': 'http://makerschannel.com/en/zoomin/community-highlights?video_id=849',
|
'url': 'https://mychannels.com/missholland/miss-holland?production_id=3416',
|
||||||
'md5': '624a512c6969236b5967bf9286345ad1',
|
'md5': 'b8993daad4262dd68d89d651c0c52c45',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '849',
|
'id': 'wUUDZZep6vQD',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'Landing a bus on a plane is an epic win',
|
'title': 'Miss Holland joins VOTE LEAVE',
|
||||||
'uploader': 'ZoomIn',
|
'description': 'Miss Holland | #13 Not a potato',
|
||||||
'description': 'md5:cd9cca2ea7b69b78be81d07020c97139',
|
'uploader': 'Miss Holland',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,12 +27,12 @@ class MakersChannelIE(InfoExtractor):
|
|||||||
|
|
||||||
def extract_data_val(attr, fatal=False):
|
def extract_data_val(attr, fatal=False):
|
||||||
return self._html_search_regex(r'data-%s\s*=\s*"([^"]+)"' % attr, video_data, attr, fatal=fatal)
|
return self._html_search_regex(r'data-%s\s*=\s*"([^"]+)"' % attr, video_data, attr, fatal=fatal)
|
||||||
minoto_id = self._search_regex(r'/id/([a-zA-Z0-9]+)', extract_data_val('video-src', True), 'minoto id')
|
minoto_id = extract_data_val('minoto-id') or self._search_regex(r'/id/([a-zA-Z0-9]+)', extract_data_val('video-src', True), 'minoto id')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'_type': 'url_transparent',
|
'_type': 'url_transparent',
|
||||||
'url': 'minoto:%s' % minoto_id,
|
'url': 'minoto:%s' % minoto_id,
|
||||||
'id': extract_data_val('video-id', True),
|
'id': url_id,
|
||||||
'title': extract_data_val('title', True),
|
'title': extract_data_val('title', True),
|
||||||
'description': extract_data_val('description'),
|
'description': extract_data_val('description'),
|
||||||
'thumbnail': extract_data_val('image'),
|
'thumbnail': extract_data_val('image'),
|
Loading…
Reference in New Issue
Block a user