PaulMartrenchar commited on
Commit
9a63dfb
·
1 Parent(s): 5e0c0b1

fix on published at

Browse files
Files changed (2) hide show
  1. jobspy_indeed.py +2 -1
  2. jobspy_linkedin.py +2 -1
jobspy_indeed.py CHANGED
@@ -1,5 +1,6 @@
1
  from jobspy import scrape_jobs
2
  from typing import List
 
3
 
4
  from JobDescription import JobDescription
5
 
@@ -47,7 +48,7 @@ def indeed_get_jobs(search_term)-> List[JobDescription]:
47
  for index, job in jobs.iterrows():
48
  job_desc = JobDescription(title=job["title"], company=job["company"], url=get_job_url(job), company_url=get_company_url(job),
49
  job_description=job["description"])
50
- job_desc.published_at=job["date_posted"]
51
  job_desc.organization_logo_url = get_logo(job)
52
  job_desc.salary_range = get_salary(job)
53
  result.append(job_desc)
 
1
  from jobspy import scrape_jobs
2
  from typing import List
3
+ from datetime import datetime
4
 
5
  from JobDescription import JobDescription
6
 
 
48
  for index, job in jobs.iterrows():
49
  job_desc = JobDescription(title=job["title"], company=job["company"], url=get_job_url(job), company_url=get_company_url(job),
50
  job_description=job["description"])
51
+ job_desc.published_at=datetime.fromtimestamp(int(job["date_posted"]))
52
  job_desc.organization_logo_url = get_logo(job)
53
  job_desc.salary_range = get_salary(job)
54
  result.append(job_desc)
jobspy_linkedin.py CHANGED
@@ -1,5 +1,6 @@
1
  from typing import List
2
  from JobDescription import JobDescription
 
3
 
4
  from jobspy import scrape_jobs
5
 
@@ -45,7 +46,7 @@ def linkedin_get_jobs(search_term)-> List[JobDescription]:
45
  for index, job in jobs.iterrows():
46
  job_desc = JobDescription(title=job["title"], company=job["company"], url=get_job_url(job), company_url=get_company_url(job),
47
  job_description=job["description"])
48
- job_desc.published_at=job["date_posted"]
49
  job_desc.organization_logo_url = get_logo(job)
50
  job_desc.salary_range = get_salary(job)
51
  result.append(job_desc)
 
1
  from typing import List
2
  from JobDescription import JobDescription
3
+ from datetime import datetime
4
 
5
  from jobspy import scrape_jobs
6
 
 
46
  for index, job in jobs.iterrows():
47
  job_desc = JobDescription(title=job["title"], company=job["company"], url=get_job_url(job), company_url=get_company_url(job),
48
  job_description=job["description"])
49
+ job_desc.published_at=datetime.fromtimestamp(int(job["date_posted"]))
50
  job_desc.organization_logo_url = get_logo(job)
51
  job_desc.salary_range = get_salary(job)
52
  result.append(job_desc)