Download Video

By 1024k.de Last update Jun 20, 2007 — Installed 171,173 times.

ehow.com support added

in
Subscribe to ehow.com support added 2 posts, 1 voice



deadelvis User
FirefoxMacintosh

Hi...
I really find this script useful... so I have added support for ehow.com videos. Maybe the author cares to integrate?

Around line 129 add...
else if (host.match(/ehow\./i) != null) {mediahost = 'eHow'}

and add this case to the function extracturls()...

case 'eHow':

embmedia = document.getElementById('VideoEmbed');
if (embmedia != null) {
source = unescape(embmedia.getAttribute('value'));
if (source.match(/flashvars=\"id=/i) !== null) {
urlstart = source.indexOf('flashvars=\"id=')+14;
urlend = source.indexOf('.flv',urlstart)+4;
source = in2html(source.substring(urlstart,urlend));
filetype = '(.flv)';
fileURL[fileURL.length] = urlstra+source+urlstrb+mediahost+urlstrc+filetype+urlstrd;
}

}
insert_button();
break;

 
deadelvis User
FirefoxMacintosh

I updated the case above... since ehow seems to use two kinds of urls for flv's. Should be flawless now:

case 'eHow':

embmedia = document.getElementById('VideoEmbed');
if (embmedia != null) {
source = unescape(embmedia.getAttribute('value'));
if (source.match(/flashvars=\"id=http/i) !== null) {
urlstart = source.indexOf('flashvars=\"id=')+14;
urlend = source.indexOf('.flv',urlstart)+4;
source = in2html(source.substring(urlstart,urlend));
filetype = '(.flv)';
fileURL[fileURL.length] = urlstra+source+urlstrb+mediahost+urlstrc+filetype+urlstrd;
alert(source);
insert_button();

}else{
urlstart = source.indexOf('flashvars=\"id=')+14;
urlend = source.indexOf('\&partnerId',urlstart);
source = in2html(source.substring(urlstart,urlend)); // video id instead
videoid=source;
xmlhttp_url = 'http://'+host+'/embedvars.aspx?isEhow=true&show...' + videoid;
xmlhttp_request();
if (xmlhttp !== false) {
function ehow_xmlhttp_response() {
if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {
xmlobject = xmlhttp.responseText;
source = in2html(xmlobject.substring(xmlobject.indexOf('&source=')+8, xmlobject.indexOf('.flv')+4));
source = unescape(source);
filetype = '(.flv)';
if (source != '') {
fileURL[fileURL.length] = urlstra+source+urlstrb+mediahost+urlstrc+filetype+urlstrd;
}
insert_button();
}
}
xmlhttp.onreadystatechange = ehow_xmlhttp_response;
xmlhttp.open("GET", xmlhttp_url, true);
xmlhttp.send(null);
}
}
}

break;