-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
25 lines (21 loc) · 808 Bytes
/
main.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
import config
from core.utilty import util
from core.crowler import crowler
from core.rigration import rigration
def is_predicted (exchange, end_date):
filename = config.get("%s_result" %(exchange.lower())) + "\\" + end_date.strftime('%d_%b_%Y') + ".csv"
return util.is_file_exist(filename)
def main():
config.configure()
start_date, end_date = util.prepareDate()
print("Started program from = %s - To = %s" %(start_date, end_date))
exchanges = config.get('exchanges')
for exchange in exchanges:
if(is_predicted(exchange, end_date)):
print('Allready Predicted for ', exchange)
continue
#crowler.load(exchange, start_date, end_date)
result, date = rigration.start(exchange, start_date, end_date)
util.write_result(exchange, result, date)
if __name__ == '__main__':
main()