Skip to content

Commit

Permalink
Salary parse (Bunsly#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
cullenwatson authored and isonupandit11 committed Jun 20, 2024
1 parent 7067472 commit f776d6f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/jobspy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,21 @@ def worker(site):
site_value, scraped_data = future.result()
site_to_jobs_dict[site_value] = scraped_data

def convert_to_annual(job_data: dict):
if job_data["interval"] == "hourly":
job_data["min_amount"] *= 2080
job_data["max_amount"] *= 2080
if job_data["interval"] == "monthly":
job_data["min_amount"] *= 12
job_data["max_amount"] *= 12
if job_data["interval"] == "weekly":
job_data["min_amount"] *= 52
job_data["max_amount"] *= 52
if job_data["interval"] == "daily":
job_data["min_amount"] *= 260
job_data["max_amount"] *= 260
job_data["interval"] = "yearly"

jobs_dfs: list[pd.DataFrame] = []

for site, job_response in site_to_jobs_dict.items():
Expand Down

0 comments on commit f776d6f

Please sign in to comment.