Update main.py
Browse files
main.py
CHANGED
|
@@ -15,23 +15,7 @@ import subprocess
|
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
-
|
| 19 |
-
try:
|
| 20 |
-
if 'ubuntu' in os.popen('lsb_release -i').read().lower():
|
| 21 |
-
os.system('sudo apt-get install aria2 -y')
|
| 22 |
-
elif 'centos' in os.popen('cat /etc/redhat-release').read().lower():
|
| 23 |
-
os.system('sudo yum install aria2 -y')
|
| 24 |
-
elif 'arch' in os.popen('cat /etc/os-release').read().lower():
|
| 25 |
-
os.system('sudo pacman -S aria2')
|
| 26 |
-
elif 'darwin' in os.popen('uname').read().lower():
|
| 27 |
-
os.system('brew install aria2')
|
| 28 |
-
else:
|
| 29 |
-
print("无法自动检测您的操作系统,请手动安装 aria2。")
|
| 30 |
-
except Exception as e:
|
| 31 |
-
print(f"安装 aria2 失败: {e}")
|
| 32 |
-
|
| 33 |
-
# 使用
|
| 34 |
-
install_aria2()
|
| 35 |
|
| 36 |
|
| 37 |
|
|
|
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
+
os.system('sudo apt-get install aria2 -y')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
|
| 21 |
|