cpi update chrome version update v7

master
joey0629 1 year ago
parent 1b74b4991a
commit 5b141c3d30
  1. 15
      main.py

@ -256,6 +256,7 @@ def broadcast_all_cpi(target:str):
broadcast_message(
f"Now :{datetime.fromtimestamp(time.time())} , Spend time :{str(round(endtimee - startimee, 3))} s",
"-1002033782195")
return True
def broadcast_all_fomc(target:str):
startimee = time.time()
date , message = find_fomc(fomc_url,'20240131a')
@ -299,6 +300,13 @@ def broadcast_all_bs4_pce(target:str):
broadcast_message(
f"Now :{datetime.fromtimestamp(time.time())} , Spend time :{str(round(endtimee - startimee, 3))} s",
"-1002033782195")
has_broadcasted = False
def wrapper_function(target):
global has_broadcasted
result = broadcast_all_cpi(target)
if result:
has_broadcasted = True
if __name__ == "__main__":
global nonfarm_url , cpi_url , fomc_url , pce_url
nonfarm_url = "https://www.bls.gov/news.release/empsit.nr0.htm"
@ -307,10 +315,13 @@ if __name__ == "__main__":
pce_url = "https://www.bea.gov/news/2024/personal-income-and-outlays-"#january-2024
# broadcast_all_pce("February", "february-2024")
print("Start Time:" , datetime.fromtimestamp(time.time()))
schedule.every().day.at("19:47").do(broadcast_all_cpi, "FEBRUARY")
schedule.every().day.at("19:56").do(wrapper_function, "FEBRUARY")
while True:
if datetime.now().strftime("%Y-%m-%d %H:%M") == "2024-04-10 19:47":
if datetime.now().strftime("%Y-%m-%d %H:%M") == "2024-04-10 19:56":
schedule.run_pending()
if has_broadcasted:
print("Broadcast completed")
break
time.sleep(0.1) # Check every 0.1 seconds
#NonFarm
# text = download_pdf_nonfarm()

Loading…
Cancel
Save