Merge pull request #120 from ytdl-org/master
[pull] master from ytdl-org:master
This commit is contained in:
commit
67eb0959f7
@ -644,7 +644,7 @@ from .minhateca import MinhatecaIE
|
|||||||
from .ministrygrid import MinistryGridIE
|
from .ministrygrid import MinistryGridIE
|
||||||
from .minoto import MinotoIE
|
from .minoto import MinotoIE
|
||||||
from .miomio import MioMioIE
|
from .miomio import MioMioIE
|
||||||
from .mit import TechTVMITIE, MITIE, OCWMITIE
|
from .mit import TechTVMITIE, OCWMITIE
|
||||||
from .mitele import MiTeleIE
|
from .mitele import MiTeleIE
|
||||||
from .mixcloud import (
|
from .mixcloud import (
|
||||||
MixcloudIE,
|
MixcloudIE,
|
||||||
@ -995,7 +995,6 @@ from .scrippsnetworks import ScrippsNetworksWatchIE
|
|||||||
from .seeker import SeekerIE
|
from .seeker import SeekerIE
|
||||||
from .senateisvp import SenateISVPIE
|
from .senateisvp import SenateISVPIE
|
||||||
from .sendtonews import SendtoNewsIE
|
from .sendtonews import SendtoNewsIE
|
||||||
from .servingsys import ServingSysIE
|
|
||||||
from .servus import ServusIE
|
from .servus import ServusIE
|
||||||
from .sevenplus import SevenPlusIE
|
from .sevenplus import SevenPlusIE
|
||||||
from .sexu import SexuIE
|
from .sexu import SexuIE
|
||||||
|
@ -65,30 +65,6 @@ class TechTVMITIE(InfoExtractor):
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class MITIE(TechTVMITIE):
|
|
||||||
IE_NAME = 'video.mit.edu'
|
|
||||||
_VALID_URL = r'https?://video\.mit\.edu/watch/(?P<title>[^/]+)'
|
|
||||||
|
|
||||||
_TEST = {
|
|
||||||
'url': 'http://video.mit.edu/watch/the-government-is-profiling-you-13222/',
|
|
||||||
'md5': '7db01d5ccc1895fc5010e9c9e13648da',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '21783',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'The Government is Profiling You',
|
|
||||||
'description': 'md5:ad5795fe1e1623b73620dbfd47df9afd',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
mobj = re.match(self._VALID_URL, url)
|
|
||||||
page_title = mobj.group('title')
|
|
||||||
webpage = self._download_webpage(url, page_title)
|
|
||||||
embed_url = self._search_regex(
|
|
||||||
r'<iframe .*?src="(.+?)"', webpage, 'embed url')
|
|
||||||
return self.url_result(embed_url)
|
|
||||||
|
|
||||||
|
|
||||||
class OCWMITIE(InfoExtractor):
|
class OCWMITIE(InfoExtractor):
|
||||||
IE_NAME = 'ocw.mit.edu'
|
IE_NAME = 'ocw.mit.edu'
|
||||||
_VALID_URL = r'^https?://ocw\.mit\.edu/courses/(?P<topic>[a-z0-9\-]+)'
|
_VALID_URL = r'^https?://ocw\.mit\.edu/courses/(?P<topic>[a-z0-9\-]+)'
|
||||||
|
@ -1,72 +0,0 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from .common import InfoExtractor
|
|
||||||
from ..utils import (
|
|
||||||
int_or_none,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class ServingSysIE(InfoExtractor):
|
|
||||||
_VALID_URL = r'https?://(?:[^.]+\.)?serving-sys\.com/BurstingPipe/adServer\.bs\?.*?&pli=(?P<id>[0-9]+)'
|
|
||||||
|
|
||||||
_TEST = {
|
|
||||||
'url': 'http://bs.serving-sys.com/BurstingPipe/adServer.bs?cn=is&c=23&pl=VAST&pli=5349193&PluID=0&pos=7135&ord=[timestamp]&cim=1?',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '5349193',
|
|
||||||
'title': 'AdAPPter_Hyundai_demo',
|
|
||||||
},
|
|
||||||
'playlist': [{
|
|
||||||
'md5': 'baed851342df6846eb8677a60a011a0f',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '29955898',
|
|
||||||
'ext': 'flv',
|
|
||||||
'title': 'AdAPPter_Hyundai_demo (1)',
|
|
||||||
'duration': 74,
|
|
||||||
'tbr': 1378,
|
|
||||||
'width': 640,
|
|
||||||
'height': 400,
|
|
||||||
},
|
|
||||||
}, {
|
|
||||||
'md5': '979b4da2655c4bc2d81aeb915a8c5014',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '29907998',
|
|
||||||
'ext': 'flv',
|
|
||||||
'title': 'AdAPPter_Hyundai_demo (2)',
|
|
||||||
'duration': 34,
|
|
||||||
'width': 854,
|
|
||||||
'height': 480,
|
|
||||||
'tbr': 516,
|
|
||||||
},
|
|
||||||
}],
|
|
||||||
'params': {
|
|
||||||
'playlistend': 2,
|
|
||||||
},
|
|
||||||
'_skip': 'Blocked in the US [sic]',
|
|
||||||
}
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
|
||||||
pl_id = self._match_id(url)
|
|
||||||
vast_doc = self._download_xml(url, pl_id)
|
|
||||||
|
|
||||||
title = vast_doc.find('.//AdTitle').text
|
|
||||||
media = vast_doc.find('.//MediaFile').text
|
|
||||||
info_url = self._search_regex(r'&adData=([^&]+)&', media, 'info URL')
|
|
||||||
|
|
||||||
doc = self._download_xml(info_url, pl_id, 'Downloading video info')
|
|
||||||
entries = [{
|
|
||||||
'_type': 'video',
|
|
||||||
'id': a.attrib['id'],
|
|
||||||
'title': '%s (%s)' % (title, a.attrib['assetID']),
|
|
||||||
'url': a.attrib['URL'],
|
|
||||||
'duration': int_or_none(a.attrib.get('length')),
|
|
||||||
'tbr': int_or_none(a.attrib.get('bitrate')),
|
|
||||||
'height': int_or_none(a.attrib.get('height')),
|
|
||||||
'width': int_or_none(a.attrib.get('width')),
|
|
||||||
} for a in doc.findall('.//AdditionalAssets/asset')]
|
|
||||||
|
|
||||||
return {
|
|
||||||
'_type': 'playlist',
|
|
||||||
'id': pl_id,
|
|
||||||
'title': title,
|
|
||||||
'entries': entries,
|
|
||||||
}
|
|
@ -248,7 +248,7 @@ class TwitchVodIE(TwitchItemBaseIE):
|
|||||||
https?://
|
https?://
|
||||||
(?:
|
(?:
|
||||||
(?:(?:www|go|m)\.)?twitch\.tv/(?:[^/]+/v(?:ideo)?|videos)/|
|
(?:(?:www|go|m)\.)?twitch\.tv/(?:[^/]+/v(?:ideo)?|videos)/|
|
||||||
player\.twitch\.tv/\?.*?\bvideo=v
|
player\.twitch\.tv/\?.*?\bvideo=v?
|
||||||
)
|
)
|
||||||
(?P<id>\d+)
|
(?P<id>\d+)
|
||||||
'''
|
'''
|
||||||
@ -306,6 +306,9 @@ class TwitchVodIE(TwitchItemBaseIE):
|
|||||||
}, {
|
}, {
|
||||||
'url': 'https://www.twitch.tv/northernlion/video/291940395',
|
'url': 'https://www.twitch.tv/northernlion/video/291940395',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
|
}, {
|
||||||
|
'url': 'https://player.twitch.tv/?video=480452374',
|
||||||
|
'only_matching': True,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user