Oh boy! Noovo changed their site again so this method is broken, though a quick pull request made it possible to use youtube-dl to download them instead.
On your bookmarklets. Get set? Download.
Step one: Install the bookmarklet
Simply drag and drop the Noovo DL button right below onto your bookmarks bar.
Step two: Pick your video and reveal the download links
Now just head to any video page with a player and click the bookmarklet. Once it runs, a list of downloadable files will pop up right at the top of the page. It won't win any design awards, but it gets the job done.
Step three: Pick a resolution and save
To download the resolution you want, just right-click the link and choose Save link as...
That's it! Easy as pie.
Technical breakdown
Brightcove Playback API used differently
Noovo still uses Brightcove as its video streaming provider, but they changed how they call its API. Brightcove now adds an extra layer of protection by having sites like Noovo.ca pass a policy token inside a standard HTTP header.
The header in question is Accept. It's a bit unusual, but they explain the reasoning in their documentation.
Code and walkthrough
$.getJSON('http://api.noovo.ca/api/v1/pages/single-episode/'+window.location.href.split('/').splice(-2).join('/'), function(resp) {
brightcoveId = resp.data.brightcoveId
if (brightcoveId == undefined) {
brightcoveId = resp.data.contents[0].brightcoveId
}
$.ajaxSetup({
headers : {
'Accept' : 'application/json;pk=super_long_secret_token'
}
});
$.getJSON('https://edge.api.brightcove.com/playback/v1/accounts/618566855001/videos/'+brightcoveId, function(resp) {
html = '<div style="background-color: white; padding-bottom: 30px"><h1>Download:</h1><ul>'
for (i in resp.sources) {
if (resp.sources[i].hasOwnProperty('src') && resp.sources[i].container == 'MP4') {
url = resp.sources[i].src
html += '<li>' + resp.sources[i].height + 'p: <a href="' + url + '">' + url + '</a></li>'
}
}
html += '</ul></div>'
$('body').prepend(html)
});
});A few notes:
- The script uses JQuery because Noovo.ca already loads it on their site, which makes life a lot easier.
- The URLs used to fetch the metadata were found by inspecting network requests in the browser console (F12).
- There is zero error handling. It would never pass code review, but hey… forgive me.
Step by step: - The script grabs the current page URL and pulls out the show and episode slug to fetch the required
brightcoveId(via Noovo's API)- For example, for
http://noovo.ca/videos/ca-va-brasser/riverbend-alma_89971 - We extract
ca-va-brasser/riverbend-alma_89971 - We call Noovo's API:
http://api.noovo.ca/api/v1/pages/single-episode/ca-va-brasser/riverbend-alma_89971 - We look up the
brightcoveId(the video's unique ID) in the returned JSON.
- For example, for
- We set up jQuery to inject the
Policy Keyinto the HTTP headerAccept - We call Brightcove's API using the
brigthcoveId - We loop through the JSON response to find the downloadable sources.
- We print the list of download links right at the top of the page.
