-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main_Billy.py
60 lines (33 loc) · 1.26 KB
/
Main_Billy.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import os
import time
import random
import magti
import telasi
# Change Values *required:
#CO/MAGTI
Username = 'YOUR CO/MAGTI USERNAME'
Password = 'YOUR CO/MAGTI PASSWORD'
###
#Telasi
Telasi_id = 'ID'
# Notify me to pay
until_its_left = 3 # days
now = time.strftime("%d.%m.%Y")
# running external py functions
print('telasi = ',telasi.telasi_bil(Telasi_id, now))
print('magti = ',magti.magti_bil(Username,Password,now))
# end of running them
def notifications(From,Message):
os.system('notify-send "%s" "%s"' % (From, Message))
notifications(telasi.telasi_bil(Telasi_id, now)[0],telasi.telasi_bil(Telasi_id, now)[1]+' left\n'
+str(telasi.telasi_bil(Telasi_id, now)[2])+' ლარი')
notifications(magti.magti_bil(Username,Password,now)[0],magti.magti_bil(Username,Password,now)[1]+' left\n'
+str(magti.magti_bil(Username,Password,now)[2]) +' ლარი')
while True:
if int(telasi.telasi_bil(Telasi_id, now)[1][:2]) <= until_its_left or int(magti.magti_bil(Username,Password,now)[1][:2]) <= until_its_left:
os.system("gnome-terminal -e 'python ./payment.py'")
break
else:
hr_in_sec = [10800, 7200] # 3 or 2
notifications('Billy','I go sleep')
time.sleep(random.choice(hr_in_sec))