【问题标题】:Naming downloads sent to JDownloader and/or IDM命名下载发送到 JDownloader 和/或 IDM
【发布时间】:2015-11-01 04:58:23
【问题描述】:

我一直在尝试将下载管理器(特别是 JDownloader 和/或 IDM)与我制作的下载文件的脚本集成。

先决条件之一是我需要能够将从 URL 中找到的文件重命名为某个名称(脚本已知)。我发现很难用 JDownloader 的Click'n'Load 2 更改文件名。此外,与 IDM 集成似乎是不可能的,因为它需要 NPAPI,据我所知,它正在被逐步淘汰……否则请告诉我:)

我目前拥有的 JDownloader 是 this jsfiddle,它通过其中一项服务添加了到 JDownloader 的链接(注意:JDownloader 必须正在运行!)。

我遇到的问题是:

  1. 视频流未正确添加到 JDownloader(而其他链接似乎可以正常工作,并且通过链接抓取器手动添加也可以)
  2. 代码不会改变文件名,这是我的脚本所需要的

任何帮助都将不胜感激。提前致谢。

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);
})

【问题讨论】:

  • 这与 NPAPI 完全没有关系;您不能使用 NPAPI 执行此处显示的任何操作。

标签: javascript jquery filenames jdownloader


【解决方案1】:

抱歉,这个模棱两可的问题......我正在寻找的答案(供参考)是:

  1. 视频流未正确添加,因为它是重定向
  2. 要更改文件名,谷歌(方便地)提供使用标题选项来更改流的名称。例如,使用 title=homer%20simpson 会将文件名从 videoplayback 更改为“homer simpson”

【讨论】:

    猜你喜欢
    • 2021-11-27
    • 2020-11-10
    • 2018-03-20
    • 1970-01-01
    • 2017-08-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-10-19
    相关资源
    最近更新 更多