This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
15 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,25 @@ | ||
import scriptabsen | ||
import values | ||
import scriptabsen as script | ||
import pytz | ||
from time import time, sleep | ||
import time | ||
from datetime import datetime | ||
|
||
print("Ready") | ||
|
||
while True: | ||
sleep(5 - time() % 5) | ||
|
||
time.sleep(5) | ||
WIB = pytz.timezone('Asia/Jakarta') | ||
time_now = datetime.now(WIB) | ||
|
||
if (time_now.strftime('%H') == '05' and | ||
time_now.strftime('%M') == '58' and | ||
time_now.strftime('%a') != 'Sat' and | ||
time_now.strftime('%a') != 'Sun'): | ||
temp = scriptabsen.runscript(values.email(), values.password(), values.browser()) | ||
if time_now.strftime('%H') == '05' and time_now.strftime('%M') == '58' and time_now.strftime('%a') != 'Sat' and time_now.strftime('%a') != 'Sun': | ||
temp = script.runscript(values.email, values.password, values.browser()) | ||
times = datetime.now(WIB) | ||
if(temp == True): | ||
print("Absen berhasil pada " + times.strftime('%c')) | ||
print("Absen berhasil pada", times.strftime('%c')) | ||
elif(temp == False): | ||
print("Absen gagal, SERVER SEKOLAH KENTANK, mencoba lagi " + | ||
print("Absen gagal, SERVER SEKOLAH KENTANK, mencoba lagi", | ||
times.strftime('%c')) | ||
ass = scriptabsen.override(values.email(), values.password(), values.browser()) | ||
if ass == True: | ||
timee = datetime.now(WIB) | ||
print("Absen berhasil pada " + timee.strftime('%c')) | ||
if script.override(values.email, values.password, values.browser()) == True: | ||
print("Absen berhasil pada " + datetime.now(WIB).strftime('%c')) | ||
else: | ||
print("Server-mu Down " + times.strftime('%c')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters