From 4853af24f7befeae453b75a1d5bee05302cbd061 Mon Sep 17 00:00:00 2001 From: khurley Date: Sun, 1 Sep 2024 19:50:41 -0400 Subject: [PATCH] polish date filter --- runbot.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/runbot.py b/runbot.py index 123cdaf..c428f92 100644 --- a/runbot.py +++ b/runbot.py @@ -22,10 +22,6 @@ def check_jobs(driver): WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.CLASS_NAME, 'RegularJob'))) - - # Let the page load completely - # driver.implicitly_wait(10) - current_url = driver.execute_script("return window.location.href") print(f"Currently parsing: {current_url}") @@ -54,7 +50,7 @@ def check_jobs(driver): date = description_parts[0].strip() if len(description_parts) > 0 else "No date" location = description_parts[1].strip() if len(description_parts) > 1 else "No location" job_type = description_parts[2].strip() if len(description_parts) > 2 else "No job type" - + print(f"today: {today}, job date: {date}") # Only add jobs where the date matches today, yesterday, or the day before if date in [today, yesterday, day_before_yesterday]: job_results.append(f"Title: {title}\nCompany: {company}\nDate: {date}\nLocation: {location}\nType: {job_type}\nLink: nyfa.org{link}")