|
|
|
@ -323,22 +323,20 @@ if __name__ == "__main__": |
|
|
|
|
pmi_url = "https://www.ismworld.org/supply-management-news-and-reports/reports/ism-report-on-business/pmi/"#+month/ |
|
|
|
|
|
|
|
|
|
print("Start Time:" , datetime.fromtimestamp(time.time())) |
|
|
|
|
''' |
|
|
|
|
for times, task in schedules.items(): |
|
|
|
|
func = task["function"] |
|
|
|
|
args = task["args"] |
|
|
|
|
print(f"Schedule {func.__name__} at {times}") |
|
|
|
|
schedule.every().day.at(times.split(" ")[1]).do(threading.Thread(target=func, args=args).start) |
|
|
|
|
while True: |
|
|
|
|
schedule.run_pending() |
|
|
|
|
if has_broadcasted: |
|
|
|
|
print("Broadcast completed") |
|
|
|
|
has_broadcasted = False |
|
|
|
|
time.sleep(0.1) # Check every 0.1 seconds |
|
|
|
|
''' |
|
|
|
|
|
|
|
|
|
#NonFarm |
|
|
|
|
# for times, task in schedules.items(): |
|
|
|
|
# func = task["function"] |
|
|
|
|
# args = task["args"] |
|
|
|
|
# print(f"Schedule {func.__name__} at {times}") |
|
|
|
|
# schedule.every().day.at(times.split(" ")[1]).do(threading.Thread(target=func, args=args).start) |
|
|
|
|
# while True: |
|
|
|
|
# schedule.run_pending() |
|
|
|
|
# if has_broadcasted: |
|
|
|
|
# print("Broadcast completed") |
|
|
|
|
# has_broadcasted = False |
|
|
|
|
# time.sleep(0.1) # Check every 0.1 seconds |
|
|
|
|
|
|
|
|
|
#NonFarm |
|
|
|
|
driver = webdriver.Chrome(options=options) |
|
|
|
|
driver, date, message = find_non_farm(driver) |
|
|
|
|
print("Non Farm Date") |
|
|
|
|