diff --git a/Dockerfile b/Dockerfile index d56b822..05057ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ RUN apt-get update && apt-get install -y python3 python3-pip && apt install nano RUN apt-get update && apt-get install -y \ wget unzip \ && rm -rf /var/lib/apt/lists/* \ - && wget https://storage.googleapis.com/chrome-for-testing-public/123.0.6312.105/linux64/chromedriver-linux64.zip \ + && wget https://storage.googleapis.com/chrome-for-testing-public/124.0.6367.60/linux64/chromedriver-linux64.zip \ && unzip chromedriver-linux64.zip \ && mv chromedriver-linux64/chromedriver /usr/local/bin/ \ && chmod +x /usr/local/bin/chromedriver diff --git a/main.py b/main.py index bec5623..59313fc 100644 --- a/main.py +++ b/main.py @@ -179,11 +179,16 @@ def broadcast_all_pce(target:str,date_target:str): has_broadcasted = False -def wrapper_function(target): +def wrapper_function_cpi(target): global has_broadcasted result = broadcast_all_cpi(target) if result: has_broadcasted = True +def wrapper_function_pce(target,date_target): + global has_broadcasted + result = broadcast_all_pce(target,date_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" @@ -191,17 +196,17 @@ if __name__ == "__main__": fomc_url = "https://www.federalreserve.gov/newsevents/pressreleases/monetary" 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:56").do(wrapper_function, "FEBRUARY") + schedule.every().day.at("10:30").do(wrapper_function_pce, "February", "february-2024") while True: - if datetime.now().strftime("%Y-%m-%d %H:%M") == "2024-04-10 19:56": + if datetime.now().strftime("%Y-%m-%d %H:%M") == "2024-04-23 10:30": schedule.run_pending() if has_broadcasted: print("Broadcast completed") break time.sleep(0.1) # Check every 0.1 seconds - ''' + #NonFarm # date , message = find_non_farm(nonfarm_url) @@ -211,6 +216,7 @@ if __name__ == "__main__": # find_cpi("FEBRUARY") #PCE + # broadcast_all_pce("February", "february-2024") # date, message1, message2 = find_pce("february-2024") # print(date) # print(message1)