bin
images
plugins
archiver
disk_usage
favorites
file_properties
movie_tv_info
searcher
template
trasher
vod_thumbnailer
youtube_download
yt_dlp
downloader
extractor
anvato_token_generator
__init__.py
abc.py
abcnews.py
abcotvs.py
academicearth.py
acast.py
adn.py
adobeconnect.py
adobepass.py
adobetv.py
adultswim.py
aenetworks.py
afreecatv.py
airmozilla.py
aliexpress.py
aljazeera.py
allocine.py
alphaporno.py
alura.py
amara.py
amazon.py
amcnetworks.py
americastestkitchen.py
amp.py
animelab.py
animeondemand.py
anvato.py
aol.py
apa.py
aparat.py
appleconnect.py
applepodcasts.py
appletrailers.py
archiveorg.py
arcpublishing.py
ard.py
arkena.py
arnes.py
arte.py
asiancrush.py
atresplayer.py
atttechchannel.py
atvat.py
audimedia.py
audioboom.py
audiomack.py
audius.py
awaan.py
aws.py
azmedien.py
baidu.py
bandaichannel.py
bandcamp.py
bannedvideo.py
bbc.py
beatport.py
beeg.py
behindkink.py
bellmedia.py
bet.py
bfi.py
bfmtv.py
bibeltv.py
bigflix.py
bild.py
bilibili.py
biobiochiletv.py
biqle.py
bitchute.py
bitwave.py
blackboardcollaborate.py
bleacherreport.py
blinkx.py
blogger.py
bloomberg.py
bokecc.py
bongacams.py
bostonglobe.py
box.py
bpb.py
br.py
bravotv.py
breakcom.py
breitbart.py
brightcove.py
businessinsider.py
buzzfeed.py
byutv.py
c56.py
cableav.py
callin.py
cam4.py
camdemy.py
cammodels.py
camwithher.py
canalalpha.py
canalc2.py
canalplus.py
canvas.py
carambatv.py
cartoonnetwork.py
cbc.py
cbs.py
cbsinteractive.py
cbslocal.py
cbsnews.py
cbssports.py
ccc.py
ccma.py
cctv.py
cda.py
ceskatelevize.py
cgtn.py
channel9.py
charlierose.py
chaturbate.py
chilloutzone.py
chingari.py
chirbit.py
cinchcast.py
cinemax.py
ciscolive.py
ciscowebex.py
cjsw.py
cliphunter.py
clippit.py
cliprs.py
clipsyndicate.py
closertotruth.py
cloudflarestream.py
cloudy.py
clubic.py
clyp.py
cmt.py
cnbc.py
cnn.py
comedycentral.py
common.py
commonmistakes.py
commonprotocols.py
condenast.py
contv.py
corus.py
coub.py
cozytv.py
cracked.py
crackle.py
crooksandliars.py
crowdbunker.py
crunchyroll.py
cspan.py
ctsnews.py
ctv.py
ctvnews.py
cultureunplugged.py
curiositystream.py
cwtv.py
daftsex.py
dailymail.py
dailymotion.py
damtomo.py
daum.py
dbtv.py
dctp.py
deezer.py
defense.py
democracynow.py
dfb.py
dhm.py
digg.py
digitalconcerthall.py
digiteka.py
discovery.py
discoverygo.py
discoveryvr.py
disney.py
dispeak.py
dlive.py
doodstream.py
dotsub.py
douyutv.py
dplay.py
drbonanza.py
dreisat.py
drooble.py
dropbox.py
dropout.py
drtuber.py
drtv.py
dtube.py
duboku.py
dumpert.py
dvtv.py
dw.py
eagleplatform.py
ebaumsworld.py
echomsk.py
egghead.py
ehow.py
eighttracks.py
einthusan.py
eitb.py
ellentube.py
elonet.py
elpais.py
embedly.py
engadget.py
epicon.py
eporner.py
eroprofile.py
ertgr.py
escapist.py
espn.py
esri.py
europa.py
europeantour.py
euscreen.py
everyonesmixtape.py
expotv.py
expressen.py
extractors.py
extremetube.py
eyedotv.py
facebook.py
fancode.py
faz.py
fc2.py
fczenit.py
filmmodu.py
filmon.py
filmweb.py
firsttv.py
fivemin.py
fivetv.py
flickr.py
folketinget.py
footyroom.py
formula1.py
fourtube.py
fox.py
fox9.py
foxgay.py
foxnews.py
foxsports.py
franceculture.py
franceinter.py
francetv.py
freesound.py
freespeech.py
freshlive.py
frontendmasters.py
fujitv.py
funimation.py
funk.py
fusion.py
fxnetworks.py
gab.py
gaia.py
gameinformer.py
gamejolt.py
gamespot.py
gamestar.py
gaskrank.py
gazeta.py
gdcvault.py
gedidigital.py
generic.py
gettr.py
gfycat.py
giantbomb.py
giga.py
gigya.py
glide.py
globo.py
glomex.py
go.py
godtube.py
gofile.py
golem.py
googledrive.py
googlepodcasts.py
googlesearch.py
gopro.py
goshgay.py
gotostage.py
gputechconf.py
gronkh.py
groupon.py
hbo.py
hearthisat.py
heise.py
hellporno.py
helsinki.py
hentaistigma.py
hgtv.py
hidive.py
historicfilms.py
hitbox.py
hitrecord.py
hketv.py
hornbunny.py
hotnewhiphop.py
hotstar.py
howcast.py
howstuffworks.py
hrfensehen.py
hrti.py
hse.py
huajiao.py
huffpost.py
hungama.py
hypem.py
ichinanalive.py
ign.py
iheart.py
imdb.py
imggaming.py
imgur.py
ina.py
inc.py
indavideo.py
infoq.py
instagram.py
internazionale.py
internetvideoarchive.py
iprima.py
iqiyi.py
ir90tv.py
itv.py
ivi.py
ivideon.py
iwara.py
izlesene.py
jamendo.py
jeuxvideo.py
joj.py
jove.py
jwplatform.py
kakao.py
kaltura.py
kanalplay.py
kankan.py
karaoketv.py
karrierevideos.py
keezmovies.py
kelbyone.py
ketnet.py
khanacademy.py
kickstarter.py
kinja.py
kinopoisk.py
konserthusetplay.py
koo.py
krasview.py
ku6.py
kusi.py
kuwo.py
la7.py
laola1tv.py
lazy_extractors.py
lbry.py
lci.py
lcp.py
lecture2go.py
lecturio.py
leeco.py
lego.py
lemonde.py
lenta.py
libraryofcongress.py
libsyn.py
lifenews.py
limelight.py
line.py
linkedin.py
linuxacademy.py
litv.py
livejournal.py
livestream.py
lnkgo.py
localnews8.py
lovehomeporn.py
lrt.py
lynda.py
m6.py
magentamusik360.py
mailru.py
mainstreaming.py
malltv.py
mangomolo.py
manoto.py
manyvids.py
maoritv.py
markiza.py
massengeschmacktv.py
matchtv.py
mdr.py
medaltv.py
mediaite.py
mediaklikk.py
medialaan.py
mediaset.py
mediasite.py
medici.py
megaphone.py
megatvcom.py
meipai.py
melonvod.py
meta.py
metacafe.py
metacritic.py
mgoon.py
mgtv.py
miaopai.py
microsoftstream.py
microsoftvirtualacademy.py
mildom.py
minds.py
ministrygrid.py
minoto.py
miomio.py
mirrativ.py
mit.py
mitele.py
mixch.py
mixcloud.py
mlb.py
mlssoccer.py
mnet.py
moevideo.py
mofosex.py
mojvideo.py
morningstar.py
motherless.py
motorsport.py
movieclips.py
moviezine.py
movingimage.py
msn.py
mtv.py
muenchentv.py
musescore.py
musicdex.py
mwave.py
mxplayer.py
mychannels.py
myspace.py
myspass.py
myvi.py
myvideoge.py
myvidster.py
n1.py
nate.py
nationalgeographic.py
naver.py
nba.py
nbc.py
ndr.py
ndtv.py
nebula.py
nerdcubed.py
neteasemusic.py
netzkino.py
newgrounds.py
newstube.py
newsy.py
nextmedia.py
nexx.py
nfhsnetwork.py
nfl.py
nhk.py
nhl.py
nick.py
niconico.py
ninecninemedia.py
ninegag.py
ninenow.py
nintendo.py
nitter.py
njpwworld.py
nobelprize.py
noco.py
nonktube.py
noodlemagazine.py
noovo.py
normalboots.py
nosvideo.py
nova.py
novaplay.py
nowness.py
noz.py
npo.py
npr.py
nrk.py
nrl.py
ntvcojp.py
ntvde.py
ntvru.py
nuevo.py
nuvid.py
nytimes.py
nzherald.py
nzz.py
odatv.py
odnoklassniki.py
oktoberfesttv.py
olympics.py
on24.py
once.py
ondemandkorea.py
onefootball.py
onet.py
onionstudios.py
ooyala.py
opencast.py
openload.py
openrec.py
ora.py
orf.py
outsidetv.py
packtpub.py
palcomp3.py
pandoratv.py
paramountplus.py
parliamentliveuk.py
parlview.py
patreon.py
pbs.py
pearvideo.py
peertube.py
peertv.py
peloton.py
people.py
performgroup.py
periscope.py
philharmoniedeparis.py
phoenix.py
photobucket.py
picarto.py
piksel.py
pinkbike.py
pinterest.py
pixivsketch.py
pladform.py
planetmarathi.py
platzi.py
playfm.py
playplustv.py
plays.py
playstuff.py
playtvak.py
playvid.py
playwire.py
pluralsight.py
plutotv.py
podomatic.py
pokemon.py
pokergo.py
polsatgo.py
polskieradio.py
popcorntimes.py
popcorntv.py
porn91.py
porncom.py
pornez.py
pornflip.py
pornhd.py
pornhub.py
pornotube.py
pornovoisines.py
pornoxo.py
presstv.py
projectveritas.py
prosiebensat1.py
prx.py
puhutv.py
puls4.py
pyvideo.py
qqmusic.py
r7.py
radiko.py
radiobremen.py
radiocanada.py
radiode.py
radiofrance.py
radiojavan.py
radiokapital.py
radiozet.py
radlive.py
rai.py
raywenderlich.py
rbmaradio.py
rcs.py
rcti.py
rds.py
redbulltv.py
reddit.py
redgifs.py
redtube.py
regiotv.py
rentv.py
restudy.py
reuters.py
reverbnation.py
rice.py
rmcdecouverte.py
ro220.py
rockstargames.py
roosterteeth.py
rottentomatoes.py
roxwel.py
rozhlas.py
rtbf.py
rte.py
rtl2.py
rtlnl.py
rtnews.py
rtp.py
rtrfm.py
rts.py
rtve.py
rtvnh.py
rtvs.py
ruhd.py
rule34video.py
rumble.py
rutube.py
rutv.py
ruutu.py
ruv.py
safari.py
saitosan.py
samplefocus.py
sapo.py
savefrom.py
sbs.py
screencast.py
screencastomatic.py
scrippsnetworks.py
scte.py
seeker.py
senategov.py
sendtonews.py
servus.py
sevenplus.py
sexu.py
seznamzpravy.py
shahid.py
shared.py
shemaroome.py
showroomlive.py
simplecast.py
sina.py
sixplay.py
skeb.py
sky.py
skyit.py
skylinewebcams.py
skynewsarabia.py
skynewsau.py
slideshare.py
slideslive.py
slutload.py
snotr.py
sohu.py
sonyliv.py
soundcloud.py
soundgasm.py
southpark.py
sovietscloset.py
spankbang.py
spankwire.py
spiegel.py
spiegeltv.py
spike.py
sport5.py
sportbox.py
sportdeutschland.py
spotify.py
spreaker.py
springboardplatform.py
sprout.py
srgssr.py
srmediathek.py
stanfordoc.py
startv.py
steam.py
stitcher.py
storyfire.py
streamable.py
streamanity.py
streamcloud.py
streamcz.py
streamff.py
streetvoice.py
stretchinternet.py
stripchat.py
stv.py
sunporno.py
sverigesradio.py
svt.py
swrmediathek.py
syfy.py
sztvhu.py
tagesschau.py
tass.py
tastytrade.py
tbs.py
tdslifeway.py
teachable.py
teachertube.py
teachingchannel.py
teamcoco.py
teamtreehouse.py
techtalks.py
ted.py
tele13.py
tele5.py
telebruxelles.py
telecinco.py
telegraaf.py
telemb.py
telemundo.py
telequebec.py
teletask.py
telewebion.py
tennistv.py
tenplay.py
testurl.py
tf1.py
tfo.py
theintercept.py
theplatform.py
thescene.py
thestar.py
thesun.py
theta.py
theweatherchannel.py
thisamericanlife.py
thisav.py
thisoldhouse.py
threeqsdn.py
threespeak.py
tiktok.py
tinypic.py
tmz.py
tnaflix.py
toggle.py
toggo.py
tokentube.py
tonline.py
toongoggles.py
toutv.py
toypics.py
traileraddict.py
trilulilu.py
trovo.py
trueid.py
trunews.py
trutv.py
tube8.py
tubitv.py
tudou.py
tumblr.py
tunein.py
tunepk.py
turbo.py
turner.py
tv2.py
tv2dk.py
tv2hu.py
tv4.py
tv5mondeplus.py
tv5unis.py
tva.py
tvanouvelles.py
tvc.py
tver.py
tvigle.py
tvland.py
tvn24.py
tvnet.py
tvnoe.py
tvnow.py
tvopengr.py
tvp.py
tvplay.py
tvplayer.py
tweakers.py
twentyfourvideo.py
twentymin.py
twentythreevideo.py
twitcasting.py
twitch.py
twitter.py
udemy.py
udn.py
ufctv.py
ukcolumn.py
uktvplay.py
umg.py
unistra.py
unity.py
uol.py
uplynk.py
urort.py
urplay.py
usanetwork.py
usatoday.py
ustream.py
ustudio.py
utreon.py
varzesh3.py
vbox7.py
veehd.py
veo.py
veoh.py
vesti.py
vevo.py
vgtv.py
vh1.py
vice.py
vidbit.py
viddler.py
videa.py
videodetective.py
videofyme.py
videomore.py
videopress.py
vidio.py
vidlii.py
vidzi.py
vier.py
viewlift.py
viidea.py
viki.py
vimeo.py
vimm.py
vimple.py
vine.py
viqeo.py
viu.py
vk.py
vlive.py
vodlocker.py
vodpl.py
vodplatform.py
voicerepublic.py
voicy.py
voot.py
voxmedia.py
vrak.py
vrt.py
vrv.py
vshare.py
vtm.py
vube.py
vuclip.py
vupload.py
vvvvid.py
vyborymos.py
vzaar.py
wakanim.py
walla.py
washingtonpost.py
wat.py
watchbox.py
watchindianporn.py
wdr.py
webcaster.py
webofstories.py
weibo.py
weiqitv.py
whowatch.py
willow.py
wimtv.py
wistia.py
worldstarhiphop.py
wppilot.py
wsj.py
wwe.py
xbef.py
xboxclips.py
xfileshare.py
xhamster.py
xiami.py
ximalaya.py
xminus.py
xnxx.py
xstream.py
xtube.py
xuite.py
xvideos.py
xxxymovies.py
yahoo.py
yandexdisk.py
yandexmusic.py
yandexvideo.py
yapfiles.py
yesjapan.py
yinyuetai.py
ynet.py
youjizz.py
youku.py
younow.py
youporn.py
yourporn.py
yourupload.py
youtube.py
zapiks.py
zaq1.py
zattoo.py
zdf.py
zee5.py
zhihu.py
zingmp3.py
zoom.py
zype.py
postprocessor
YoutubeDL.py
__init__.py
__main__.py
aes.py
cache.py
compat.py
cookies.py
jsinterp.py
minicurses.py
options.py
socks.py
update.py
utils.py
version.py
webvtt.py
yt_dlp-2022.2.4.dist-info
__init__.py
__main__.py
download.sh
manifest.json
plugin.py
README.md
src
user_config
.gitignore
LICENSE
README.md
210 lines
8.5 KiB
Python
210 lines
8.5 KiB
Python
|
from __future__ import unicode_literals
|
||
|
|
||
|
import base64
|
||
|
import re
|
||
|
|
||
|
from .common import InfoExtractor
|
||
|
from ..compat import (
|
||
|
compat_b64decode,
|
||
|
compat_str,
|
||
|
)
|
||
|
from ..utils import (
|
||
|
determine_ext,
|
||
|
float_or_none,
|
||
|
int_or_none,
|
||
|
try_get,
|
||
|
unsmuggle_url,
|
||
|
)
|
||
|
|
||
|
|
||
|
class OoyalaBaseIE(InfoExtractor):
|
||
|
_PLAYER_BASE = 'http://player.ooyala.com/'
|
||
|
_CONTENT_TREE_BASE = _PLAYER_BASE + 'player_api/v1/content_tree/'
|
||
|
_AUTHORIZATION_URL_TEMPLATE = _PLAYER_BASE + 'sas/player_api/v2/authorization/embed_code/%s/%s'
|
||
|
|
||
|
def _extract(self, content_tree_url, video_id, domain=None, supportedformats=None, embed_token=None):
|
||
|
content_tree = self._download_json(content_tree_url, video_id)['content_tree']
|
||
|
metadata = content_tree[list(content_tree)[0]]
|
||
|
embed_code = metadata['embed_code']
|
||
|
pcode = metadata.get('asset_pcode') or embed_code
|
||
|
title = metadata['title']
|
||
|
|
||
|
auth_data = self._download_json(
|
||
|
self._AUTHORIZATION_URL_TEMPLATE % (pcode, embed_code),
|
||
|
video_id, headers=self.geo_verification_headers(), query={
|
||
|
'domain': domain or 'player.ooyala.com',
|
||
|
'supportedFormats': supportedformats or 'mp4,rtmp,m3u8,hds,dash,smooth',
|
||
|
'embedToken': embed_token,
|
||
|
})['authorization_data'][embed_code]
|
||
|
|
||
|
urls = []
|
||
|
formats = []
|
||
|
streams = auth_data.get('streams') or [{
|
||
|
'delivery_type': 'hls',
|
||
|
'url': {
|
||
|
'data': base64.b64encode(('http://player.ooyala.com/hls/player/all/%s.m3u8' % embed_code).encode()).decode(),
|
||
|
}
|
||
|
}]
|
||
|
for stream in streams:
|
||
|
url_data = try_get(stream, lambda x: x['url']['data'], compat_str)
|
||
|
if not url_data:
|
||
|
continue
|
||
|
s_url = compat_b64decode(url_data).decode('utf-8')
|
||
|
if not s_url or s_url in urls:
|
||
|
continue
|
||
|
urls.append(s_url)
|
||
|
ext = determine_ext(s_url, None)
|
||
|
delivery_type = stream.get('delivery_type')
|
||
|
if delivery_type == 'hls' or ext == 'm3u8':
|
||
|
formats.extend(self._extract_m3u8_formats(
|
||
|
re.sub(r'/ip(?:ad|hone)/', '/all/', s_url), embed_code, 'mp4', 'm3u8_native',
|
||
|
m3u8_id='hls', fatal=False))
|
||
|
elif delivery_type == 'hds' or ext == 'f4m':
|
||
|
formats.extend(self._extract_f4m_formats(
|
||
|
s_url + '?hdcore=3.7.0', embed_code, f4m_id='hds', fatal=False))
|
||
|
elif delivery_type == 'dash' or ext == 'mpd':
|
||
|
formats.extend(self._extract_mpd_formats(
|
||
|
s_url, embed_code, mpd_id='dash', fatal=False))
|
||
|
elif delivery_type == 'smooth':
|
||
|
self._extract_ism_formats(
|
||
|
s_url, embed_code, ism_id='mss', fatal=False)
|
||
|
elif ext == 'smil':
|
||
|
formats.extend(self._extract_smil_formats(
|
||
|
s_url, embed_code, fatal=False))
|
||
|
else:
|
||
|
formats.append({
|
||
|
'url': s_url,
|
||
|
'ext': ext or delivery_type,
|
||
|
'vcodec': stream.get('video_codec'),
|
||
|
'format_id': delivery_type,
|
||
|
'width': int_or_none(stream.get('width')),
|
||
|
'height': int_or_none(stream.get('height')),
|
||
|
'abr': int_or_none(stream.get('audio_bitrate')),
|
||
|
'vbr': int_or_none(stream.get('video_bitrate')),
|
||
|
'fps': float_or_none(stream.get('framerate')),
|
||
|
})
|
||
|
if not formats and not auth_data.get('authorized'):
|
||
|
self.raise_no_formats('%s said: %s' % (
|
||
|
self.IE_NAME, auth_data['message']), expected=True)
|
||
|
self._sort_formats(formats)
|
||
|
|
||
|
subtitles = {}
|
||
|
for lang, sub in metadata.get('closed_captions_vtt', {}).get('captions', {}).items():
|
||
|
sub_url = sub.get('url')
|
||
|
if not sub_url:
|
||
|
continue
|
||
|
subtitles[lang] = [{
|
||
|
'url': sub_url,
|
||
|
}]
|
||
|
|
||
|
return {
|
||
|
'id': embed_code,
|
||
|
'title': title,
|
||
|
'description': metadata.get('description'),
|
||
|
'thumbnail': metadata.get('thumbnail_image') or metadata.get('promo_image'),
|
||
|
'duration': float_or_none(metadata.get('duration'), 1000),
|
||
|
'subtitles': subtitles,
|
||
|
'formats': formats,
|
||
|
}
|
||
|
|
||
|
|
||
|
class OoyalaIE(OoyalaBaseIE):
|
||
|
_VALID_URL = r'(?:ooyala:|https?://.+?\.ooyala\.com/.*?(?:embedCode|ec)=)(?P<id>.+?)(&|$)'
|
||
|
|
||
|
_TESTS = [
|
||
|
{
|
||
|
# From http://it.slashdot.org/story/13/04/25/178216/recovering-data-from-broken-hard-drives-and-ssds-video
|
||
|
'url': 'http://player.ooyala.com/player.js?embedCode=pxczE2YjpfHfn1f3M-ykG_AmJRRn0PD8',
|
||
|
'info_dict': {
|
||
|
'id': 'pxczE2YjpfHfn1f3M-ykG_AmJRRn0PD8',
|
||
|
'ext': 'mp4',
|
||
|
'title': 'Explaining Data Recovery from Hard Drives and SSDs',
|
||
|
'description': 'How badly damaged does a drive have to be to defeat Russell and his crew? Apparently, smashed to bits.',
|
||
|
'duration': 853.386,
|
||
|
},
|
||
|
# The video in the original webpage now uses PlayWire
|
||
|
'skip': 'Ooyala said: movie expired',
|
||
|
}, {
|
||
|
# Only available for ipad
|
||
|
'url': 'http://player.ooyala.com/player.js?embedCode=x1b3lqZDq9y_7kMyC2Op5qo-p077tXD0',
|
||
|
'info_dict': {
|
||
|
'id': 'x1b3lqZDq9y_7kMyC2Op5qo-p077tXD0',
|
||
|
'ext': 'mp4',
|
||
|
'title': 'Simulation Overview - Levels of Simulation',
|
||
|
'duration': 194.948,
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
# Information available only through SAS api
|
||
|
# From http://community.plm.automation.siemens.com/t5/News-NX-Manufacturing/Tool-Path-Divide/ba-p/4187
|
||
|
'url': 'http://player.ooyala.com/player.js?embedCode=FiOG81ZTrvckcchQxmalf4aQj590qTEx',
|
||
|
'md5': 'a84001441b35ea492bc03736e59e7935',
|
||
|
'info_dict': {
|
||
|
'id': 'FiOG81ZTrvckcchQxmalf4aQj590qTEx',
|
||
|
'ext': 'mp4',
|
||
|
'title': 'Divide Tool Path.mp4',
|
||
|
'duration': 204.405,
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
# empty stream['url']['data']
|
||
|
'url': 'http://player.ooyala.com/player.js?embedCode=w2bnZtYjE6axZ_dw1Cd0hQtXd_ige2Is',
|
||
|
'only_matching': True,
|
||
|
}
|
||
|
]
|
||
|
|
||
|
@staticmethod
|
||
|
def _url_for_embed_code(embed_code):
|
||
|
return 'http://player.ooyala.com/player.js?embedCode=%s' % embed_code
|
||
|
|
||
|
@classmethod
|
||
|
def _build_url_result(cls, embed_code):
|
||
|
return cls.url_result(cls._url_for_embed_code(embed_code),
|
||
|
ie=cls.ie_key())
|
||
|
|
||
|
def _real_extract(self, url):
|
||
|
url, smuggled_data = unsmuggle_url(url, {})
|
||
|
embed_code = self._match_id(url)
|
||
|
domain = smuggled_data.get('domain')
|
||
|
supportedformats = smuggled_data.get('supportedformats')
|
||
|
embed_token = smuggled_data.get('embed_token')
|
||
|
content_tree_url = self._CONTENT_TREE_BASE + 'embed_code/%s/%s' % (embed_code, embed_code)
|
||
|
return self._extract(content_tree_url, embed_code, domain, supportedformats, embed_token)
|
||
|
|
||
|
|
||
|
class OoyalaExternalIE(OoyalaBaseIE):
|
||
|
_VALID_URL = r'''(?x)
|
||
|
(?:
|
||
|
ooyalaexternal:|
|
||
|
https?://.+?\.ooyala\.com/.*?\bexternalId=
|
||
|
)
|
||
|
(?P<partner_id>[^:]+)
|
||
|
:
|
||
|
(?P<id>.+)
|
||
|
(?:
|
||
|
:|
|
||
|
.*?&pcode=
|
||
|
)
|
||
|
(?P<pcode>.+?)
|
||
|
(?:&|$)
|
||
|
'''
|
||
|
|
||
|
_TEST = {
|
||
|
'url': 'https://player.ooyala.com/player.js?externalId=espn:10365079&pcode=1kNG061cgaoolOncv54OAO1ceO-I&adSetCode=91cDU6NuXTGKz3OdjOxFdAgJVtQcKJnI&callback=handleEvents&hasModuleParams=1&height=968&playerBrandingId=7af3bd04449c444c964f347f11873075&targetReplaceId=videoPlayer&width=1656&wmode=opaque&allowScriptAccess=always',
|
||
|
'info_dict': {
|
||
|
'id': 'FkYWtmazr6Ed8xmvILvKLWjd4QvYZpzG',
|
||
|
'ext': 'mp4',
|
||
|
'title': 'dm_140128_30for30Shorts___JudgingJewellv2',
|
||
|
'duration': 1302.0,
|
||
|
},
|
||
|
'params': {
|
||
|
# m3u8 download
|
||
|
'skip_download': True,
|
||
|
},
|
||
|
}
|
||
|
|
||
|
def _real_extract(self, url):
|
||
|
partner_id, video_id, pcode = self._match_valid_url(url).groups()
|
||
|
content_tree_url = self._CONTENT_TREE_BASE + 'external_id/%s/%s:%s' % (pcode, partner_id, video_id)
|
||
|
return self._extract(content_tree_url, video_id)
|