feat: support hybrid+remote job search and use job_scraper_db
- Replace remote_only flag with configurable work_types list (remote, hybrid, onsite) - Switch database from job_matcher_db to job_scraper_db - Add ALTER TABLE migration for existing jobs table with scoring columns Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -83,7 +83,13 @@ class LinkedInJobScraper:
|
||||
seen_links = set()
|
||||
encoded_keyword = quote(keyword)
|
||||
encoded_location = quote(location)
|
||||
remote_only = self.config.get("remote_only", False)
|
||||
work_type_map = {"onsite": "1", "remote": "2", "hybrid": "3"}
|
||||
work_types = self.config.get("work_types", [])
|
||||
f_wt = ",".join(
|
||||
work_type_map[wt.lower()]
|
||||
for wt in work_types
|
||||
if wt.lower() in work_type_map
|
||||
)
|
||||
delay_range = self.config.get("delay_between_pages", [3, 6])
|
||||
|
||||
for page in range(pages):
|
||||
@@ -94,8 +100,8 @@ class LinkedInJobScraper:
|
||||
f"keywords={encoded_keyword}&location={encoded_location}"
|
||||
f"&start={start_index}"
|
||||
)
|
||||
if remote_only:
|
||||
url += "&f_WT=2"
|
||||
if f_wt:
|
||||
url += f"&f_WT={f_wt}"
|
||||
|
||||
try:
|
||||
response = self.session.get(url, timeout=15)
|
||||
|
||||
Reference in New Issue
Block a user