github_down

This commit is contained in:
2025-12-21 14:21:12 +08:00
parent afc5c76fd4
commit a1b26632e9
3 changed files with 290 additions and 0 deletions

39
github_down/gen.py Normal file
View File

@ -0,0 +1,39 @@
from subprocess import run
proxies = [
"https://hk.gh-proxy.org/",
"https://cdn.gh-proxy.org/",
"https://gh-proxy.org/",
"https://edgeone.gh-proxy.org/",
"https://gh-proxy.top/",
"https://gh-proxy.net/",
"https://gh-proxy.com/",
"https://ghfast.top/",
"https://gh.ddlc.top/",
"https://gh.llkk.cc/",
"https://ghproxy.homeboyc.cn/",
"",
]
cmd = [
"aria2c",
"--auto-file-renaming=false",
"--retry-wait=2",
"--max-tries=0",
"--timeout=10",
"--connect-timeout=5",
"--lowest-speed-limit=100K",
"-x","4","-s","24","-k","1M",
]
try:
run("aria2c --version", check=True, capture_output=True)
except Exception:
print("请先安装aria2")
exit(1)
input_url = input("请输入GitHub文件链接: ").strip()
cmd.extend(
[f"{proxy}{input_url}" for proxy in proxies]
)
run(cmd)