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:
harwinder
2026-05-27 19:47:22 -04:00
parent e608d367e2
commit 39a29a8e4e
3 changed files with 28 additions and 7 deletions
+9 -3
View File
@@ -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)