zoukankan      html  css  js  c++  java
  • 用aria2c下迅雷离线资源

    感觉用aria2c下载迅雷离线资源时会比迅雷快一点,具体原因就不知了。

    在网页迅雷上获取同一资源的两条不同vod类型的下载链接,保存在uris.txt的同一行,用TAB分开,然后ENTER、SPACE、out=name.mkv,再运行以下批处理:

    下载时需要从火狐上导出cookies.txt,用Export Cookies 1.2插件。

    可以多任务下载,将下载链接保存在下一行即可,如果想取消,可在前加一个#,详细说明可去aria2c官网

    尤其对好几G的大文件,开始几分钟速度会很慢

    需要nircmd.exe

    @echo on&SetLocal EnableDelayedExpansion
    cd /d %~dp0
    for /f "eol=# tokens=2 delims==" %%i in (uris.txt) do set a=%%i
    if exist download\%a% if not exist download\%a%.aria2 exit
    set a=
    tasklist /nh|findstr /i "aria2c.exe"
    if %errorlevel%==0 exit
    
    :lp
    for /r download %%i in (*.aria2) do set /a a+=1
    start /b "" "file\aria2c.exe" -c -j1 -x16 -k1M -s1000 -m1000 -ddownload --file-allocation=falloc --load-cookies=cookies.txt -iuris.txt --on-download-complete=%~df0
    nircmd wait 1800000
    for /r download %%i in (*.aria2) do set /a b+=1
    if %a% gtr %b% nircmd wait 60000
    taskkill /f /im aria2c.exe >nul
    if errorlevel 1 exit
    set a=&set b=
    goto :lp
    

    其中的关键语句是

    file\aria2c.exe -c -j1 -x16 -k1M -s1000 -m1000 -ddownload --file-allocation=falloc --load-cookies=cookies.txt -iuris.txt

    那一些参数是我经过多翻试验后写出的,这样大概就是aria2c的最快速度了

    对了网速不好时,aria2c会慢慢丢到掉一些源,所以我设定为每半小时重启一次aria2c


  • 相关阅读:
    在java中怎样获得当前日期时间
    java 常见异常
    线程中的current thread not owner异常错误
    hibernate 关于hbm.xml编写的总结
    java web 常见异常及解决办法
    初用Ajax
    JavaScript动态修改html组件form的action属性
    Ajax中文乱码的解决
    No repository found error in Installing ADT
    eclipse 安装 CDT
  • 原文地址:https://www.cnblogs.com/cnsealine/p/3297706.html
Copyright © 2011-2022 走看看