我一直在尝试将下载管理器(特别是JDownloader和/或IDM)与我下载文件的脚本集成在一起。
其中一个先决条件是我需要能够将从URL找到的文件重命名为某个名称(脚本已知)。我发现用JDownloader的Click'n'Load 2更改文件名很困难。此外,与IDM的集成似乎是不可能的,因为它需要NPAPI据我所知正在逐步淘汰......让我知道其他情况:)
我目前为JDownloader提供的是this jsfiddle,它通过其中一个服务添加了一个指向JDownloader的链接(注意:JDownloader必须正在运行!)。
我遇到的问题是:
任何帮助都会非常感激。提前谢谢。
HTML:
<!-- A link that does not work, type is direct video stream, works through manual links adding but not through Click'n'Load -->
<input type='button' id='testTitle' value='Test title' link='https://2.bp.blogspot.com/2p41_DNcufgUPAgtoT-DyGVK2rdyCz8PLfNAMhSegg=m18'>
<!-- A link that works, type is .exe from rapidshare.com -->
<input type='button' id='rapidShare' value='RapidShare' link='http://www.rapidshare.com/files/407970280/RapidShareManager2WindowsSetup.exe'>
JS:
//The function that adds the link to JDownload
function JDownload(title, url){
$.post("http://127.0.0.1:9666/flash/add", {
urls:url,
fileName:title //This does not work...
});
}
//Buttons for convenience
$("input[type='button']").click(function(){
var title = $(this).attr("value");
var link = $(this).attr("link");
JDownload(title, link);
})
答案 0 :(得分:0)
对于这样一个含糊不清的问题感到抱歉......我正在寻找的答案(供参考)是: