Pokud se týká Opery a NAPROSTO JEDNODUCHÉHO stahování flash videí z většiny flashových přehrávačů, sice se to nehodí už do tohoto vlákna, ale:
řeším to uživatelským javascriptem. Je třeba nastavit si nějakou složku v Menu > Nástroje > Pokročilé volby > Obsah > Nastavit JavaScript... > Složka skriptů uživatele, a do nějakého souboru vložit tento skript:
// ==UserScript==
// @name getVideos
// @author Luis Guillermo Nuñez
// @namespace http://userjs.org/
// @version 1.0
// @description The script detects flv videos on a website and build links to let you download the videos on flv or other formats.
// @ujs:category browser: enhancements
// ==/UserScript==
/*
* License: E-mailware, send me an e-mail if you use it.
* You can modify it, adapt it, anything you like,
* as long as you put my name somewhere
*/
/*
* Long description:
* This script detects flash .flv movies and
* adds download links at the bottom of that movie,
* it currently supports youtube videos with multiple
* download formats, and generic .flv movies.
*
* tested on:
* - flv-player videos (http://flv-player.net/) and opensource
* - flv player (http://www.trenttompkins.com/Downloads/OpenSource-FLV-Player.html)
* - and of course, youtube.com
*
*
* Future development:
* I will add more players depending on the demand and difficulty.
* I want to add online transcoding services to allow download
* the videos on different formats, almost certainly on the next release
*/
window.addEventListener('load', function(){
var videoActions = new Array();
var linksContainer = false;
var videoFound = false;
/*
* Youtube specific
*/
if( location.hostname.indexOf('youtube.com') != -1 ) {
if(document.getElementById('watch-player-div') && document.getElementById('watch-player-div').getElementsByTagName('embed')[0]) {
var url = document.getElementById('watch-player-div').getElementsByTagName('embed')[0].getAttribute("flashvars", 0);
var originalQuery = url.toString().split("?");
var variablesURL = Array();
variablesURL = originalQuery.toString().split("&");
var queryArray = new Array();
for(var j = 0, variableURL; variableURL = variablesURL[j]; j++ ) {
var pair = variableURL.split("=");
if (pair[0] == 'video_id') {
queryArray.push('video_id=' + pair[1]);
}
if (pair[0] == 't') {
queryArray.push('t=' + pair[1]);
}
}
query = queryArray.join('&')
}
videoActions[0] = {url: "http://www.youtube.com/get_video?" + query, file_type: 'flv'};
videoActions[1] = {url: "http://www.youtube.com/get_video?fmt=18&" + query, file_type: 'mp4'};
videoActions[2] = {url: "http://www.youtube.com/get_video?fmt=17&" + query, file_type: '3gp'};
videoActions[3] = {url: "http://www.youtube.com/get_video?fmt=6&" + query, file_type: 'hq flv', notes: 'It may not work'};
videoFound = true;
linksContainer = document.getElementById('watch-player-div');
}
/*
* Generic flash player using embed
*/
if (!videoFound) {
var genericEmbMedia=document.getElementsByTagName('embed');
for(var i = 0, embItem; embItem = genericEmbMedia[i]; i++ ) {
/*
* Search for flv file requests
*/
var flashVar=unescape(embItem.getAttribute('flashvars'));
if(flashVar.indexOf('.flv') != -1) {
var variablesURL = Array();
variablesURL = flashVar.toString().split("&");
for(var j = 0, variableURL; variableURL = variablesURL[j]; j++ ) {
var pair = variableURL.split("=");
if (variableURL.indexOf('.flv') != -1) {
videoActions[0] = {url: pair[1], file_type: 'flv'};
videoFound = true;
linksContainer = embItem.parentNode;
break;
}
}
}
}
}
/*
* Generic flash player using object
*/
if (!videoFound) {
var genericParamMedia=document.getElementsByTagName('param');
for(var i = 0, paramItem; paramItem = genericParamMedia[i]; i++ ) {
/*
* Search for flv file requests
*/
var flashVar=unescape(paramItem.getAttribute('value'));
if(flashVar.indexOf('.flv') != -1) {
var variablesURL = Array();
variablesURL = flashVar.toString().split("&");
for(var j = 0, variableURL; variableURL = variablesURL[j]; j++ ) {
var pair = variableURL.split("=");
if (variableURL.indexOf('.flv') != -1) {
videoActions[0] = {url: pair[1], file_type: 'flv'};
videoFound = true;
linksContainer = paramItem.parentNode.parentNode;
break;
}
}
}
if(videoFound == true)
break;
}
}
if (linksContainer) {
var header = document.createElement('h5');
header.appendChild(document.createTextNode("Download this Video as"));
var linkList = document.createElement('ul');
linkList.style.padding = "0px";
for(var i = 0, videoAction; videoAction = videoActions[i]; i++ ) {
var linkItem = document.createElement('li');
var linkVideo = document.createElement('a');
linkVideo.href=videoAction.url;
var txt = document.createTextNode(videoAction.file_type);
linkVideo.appendChild(txt);
linkItem.appendChild(linkVideo);
linkItem.style.display = 'inline';
linkItem.style.margin = '0px 5px'
linkList.appendChild(linkItem);
linkList.style.display = 'inline';
}
header.style.display = 'inline';
var containerBlock = document.createElement('div');
containerBlock.appendChild(header);
containerBlock.appendChild(linkList);
linksContainer.appendChild(containerBlock);
}
}, false );