Merge pull request #49 from snithercode/fix/experience-level-filtering

Fix: Updated get_base_search_url to correctly apply user's experienceLevel preferences.
This commit is contained in:
Federico 2024-08-15 10:54:35 +01:00 committed by GitHub
commit 6c4183ec98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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']}")