-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
32 lines (24 loc) · 723 Bytes
/
Copy pathmain.py
File metadata and controls
32 lines (24 loc) · 723 Bytes
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
import time
from station import Station
class MyStation(Station):
def __init__(self, password, codes, retoken=True, test=False):
super().__init__(password, retoken=retoken, test=test)
self.codes = codes
station.unregister_all()
for code in codes:
self.register_tosyou(code)
def main(self):
self.ws_runner()
while True:
self.lock.acquire()
print(self.msgs)
self.lock.release()
time.sleep(0.5)
def main():
with open("password.txt", "r") as f:
password = f.read().strip()
codes = (9202,)
station = MyStation(password, codes)
station.main()
if __name__ == "__main__":
main()