github_down
This commit is contained in:
39
github_down/gen.py
Normal file
39
github_down/gen.py
Normal 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)
|
||||
Reference in New Issue
Block a user