mirror of
https://github.com/Bunsly/JobSpy.git
synced 2026-03-05 03:54:31 -08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6bb7d81ba8 | ||
|
|
0e046432d1 |
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "python-jobspy"
|
name = "python-jobspy"
|
||||||
version = "1.1.62"
|
version = "1.1.64"
|
||||||
description = "Job scraper for LinkedIn, Indeed, Glassdoor & ZipRecruiter"
|
description = "Job scraper for LinkedIn, Indeed, Glassdoor & ZipRecruiter"
|
||||||
authors = ["Zachary Hampton <zachary@bunsly.com>", "Cullen Watson <cullen@bunsly.com>"]
|
authors = ["Zachary Hampton <zachary@bunsly.com>", "Cullen Watson <cullen@bunsly.com>"]
|
||||||
homepage = "https://github.com/Bunsly/JobSpy"
|
homepage = "https://github.com/Bunsly/JobSpy"
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ class LinkedInScraper(Scraper):
|
|||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
response = self.session.get(
|
response = self.session.get(
|
||||||
f"{self.base_url}/jobs-guest/jobs/api/jobPosting/{job_id}", timeout=5
|
f"{self.base_url}/jobs/view/{job_id}", timeout=5
|
||||||
)
|
)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
except:
|
except:
|
||||||
|
|||||||
@@ -198,6 +198,7 @@ def extract_salary(
|
|||||||
if not salary_str:
|
if not salary_str:
|
||||||
return None, None, None, None
|
return None, None, None, None
|
||||||
|
|
||||||
|
annual_max_salary = None
|
||||||
min_max_pattern = r"\$(\d+(?:,\d+)?(?:\.\d+)?)([kK]?)\s*[-—–]\s*(?:\$)?(\d+(?:,\d+)?(?:\.\d+)?)([kK]?)"
|
min_max_pattern = r"\$(\d+(?:,\d+)?(?:\.\d+)?)([kK]?)\s*[-—–]\s*(?:\$)?(\d+(?:,\d+)?(?:\.\d+)?)([kK]?)"
|
||||||
|
|
||||||
def to_int(s):
|
def to_int(s):
|
||||||
@@ -238,6 +239,8 @@ def extract_salary(
|
|||||||
annual_max_salary = max_salary
|
annual_max_salary = max_salary
|
||||||
|
|
||||||
# Ensure salary range is within specified limits
|
# Ensure salary range is within specified limits
|
||||||
|
if not annual_max_salary:
|
||||||
|
return None, None, None, None
|
||||||
if (
|
if (
|
||||||
lower_limit <= annual_min_salary <= upper_limit
|
lower_limit <= annual_min_salary <= upper_limit
|
||||||
and lower_limit <= annual_max_salary <= upper_limit
|
and lower_limit <= annual_max_salary <= upper_limit
|
||||||
|
|||||||
Reference in New Issue
Block a user