Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kdo2064 authored Jun 29, 2024
1 parent 6cd5fd0 commit b458d86
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
import os
import platform

try:
import pytz
import httpx
except:
_ = os.system('pip install illusionanime illusioncolor httpx datetime pytz' if os.name == 'nt' else 'pip3 install illusionanime illusioncolor httpx datetime pytz')
except ImportError:
os.system('pip install illusionanime illusioncolor httpx datetime pytz' if os.name == 'nt' else 'pip3 install illusionanime illusioncolor httpx datetime pytz')

def check_os():
os_name = platform.system()

if os_name == 'Windows':
os.system('python .\\windows\\run.py')
elif os_name == 'Linux':
if 'TERMUX_PREFIX' in os.environ:
whoami = os.popen('whoami').read().strip()
if 'TERMUX_PREFIX' in os.environ or whoami == 'u0':
os.system('cd linux && python3 run.py')
else:
os.system('cd linux && python3 run.py')
Expand Down

0 comments on commit b458d86

Please sign in to comment.