建议可以自行设置更新代理节点 以及更新仅使用一个cookie
描述
有多个cookie要下载多次 并且这个代理还不如原始链接
[2022-08-18T22:23:46.081+08] [Warn] [自动下载] [ 切换代理download.fastgit.org ] [> ] 1.25%[2022-08-18T22:24:40.685+08] [Error] [自动下载] [ [请求失败]: 请求超时 ] [2022-08-18T22:24:40.685+08] [Warn] [自动下载] [ 使用原始链接github.com ] [重定向]状态码:302 location:https://objects.githubusercontent.com/github-production-release-asset-2e65be/384606320/a82aeedf-8516-4106-b286-405e8346ce95?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220818%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220818T142441Z&X-Amz-Expires=300&X-Amz-Signature=1493e27096e75c680779154695fcc8fcbf535de611c042b3d2a7bb91aaea7138&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=384606320&response-content-disposition=attachment%3B%20filename%3Dlottery-auto-script-node16-linux-x64.zip&response-content-type=application%2Foctet-stream [2022-08-18T22:25:01.505+08] [Error] [更新脚本] [ [请求失败]: 请求超时 ] [2022-08-18T22:25:01.506+08] [Info] [时延] [60000ms]
本人目前以该shell脚本形式更新 cd ~/lottery last_version=$(cat /root/lottery/tag.txt) wget -qO- -t1 -T2 "https://api.github.com/repos/shanmiteko/LotteryAutoScript/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/"//g;s/,//g;s/ //g' > /root/lottery/tag.txt tag=$(cat /root/lottery/tag.txt) if [ $tag = $last_version ] then exit else wget http://ghproxy.com/https://github.com/shanmiteko/LotteryAutoScript/releases/download/${tag}/lottery-auto-script-node16-linux-x64.zip unzip -o *.zip "lottery" -d ~/lottery/ chmod +x ./lottery
可恶 我还说怎么一直404 原来没有node16版本了
Linux版的有带一个更新脚本,用那个就好了
脚本中直接unzip需要手动输入y或者n还是不太方便,但是如果直接全部覆盖又不太好,所以我认为可以加上unzip -o *.zip "lottery" 参数直接解压压缩包里的lottery主程序
lottery update为啥会下载两次 latest_version0.zip latest_version1.zip 我还以为是不同的东西呢
其中一个是低版本windows适配
我觉得可以自己把node -v结果作为变量,然后只下载当前版本的压缩包然后配合unzip就可以一键更新了