From a300ca64ada2f843acce4bd194a55f86c358aa0b Mon Sep 17 00:00:00 2001 From: Drew Haile Date: Thu, 15 Aug 2024 03:06:37 -0400 Subject: [PATCH] Fix get_base_search_url to respect user's experience level preferences - Iterate through 'experienceLevel' dictionary - Include only levels set to True - Map indexes to LinkedIn's experience level values (1-6) --- linkedIn_job_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linkedIn_job_manager.py b/linkedIn_job_manager.py index 6fbe3bf..db50633 100644 --- a/linkedIn_job_manager.py +++ b/linkedIn_job_manager.py @@ -176,7 +176,7 @@ class LinkedInJobManager: url_parts = [] if parameters['remote']: url_parts.append("f_CF=f_WRA") - experience_levels = [str(i+1) for i, v in enumerate(parameters.get('experienceLevel', [])) if v] + experience_levels = [str(i+1) for i, (level, v) in enumerate(parameters.get('experienceLevel', {}).items()) if v] if experience_levels: url_parts.append(f"f_E={','.join(experience_levels)}") url_parts.append(f"distance={parameters['distance']}")