Skip to content

Commit

Permalink
polish date filter
Browse files Browse the repository at this point in the history
  • Loading branch information
khurley committed Sep 1, 2024
1 parent 9e45b46 commit 4853af2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions runbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

Expand Down Expand Up @@ -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}")
Expand Down

0 comments on commit 4853af2

Please sign in to comment.