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


  • 相关阅读:
    qemu+chroot构建arm aarch64虚拟机
    <转>Linux环境下段错误的产生原因及调试方法小结
    <转>PCA的数学原理
    博客分类整理
    detectron2 配置记录
    如何读取部分的预训练模型
    重新配置语义分割实验环境遇到的坑
    pytorch 调整tensor的维度位置
    seg代码配置的踩坑记录
    Alienware R8外星人台式机安装双系统(WIN10+Ubuntu)的总结
  • 原文地址:https://www.cnblogs.com/cnsealine/p/3297706.html
Copyright © 2011-2022 走看看