blacklistfix
This commit is contained in:
parent
0ef94a493b
commit
9a4ef6c0f5
@ -222,8 +222,7 @@ class LinkedInJobManager:
|
|||||||
|
|
||||||
def is_blacklisted(self, job_title, company, link):
|
def is_blacklisted(self, job_title, company, link):
|
||||||
job_title_words = job_title.lower().split(' ')
|
job_title_words = job_title.lower().split(' ')
|
||||||
company_lower = company.lower()
|
|
||||||
title_blacklisted = any(word in job_title_words for word in self.title_blacklist)
|
title_blacklisted = any(word in job_title_words for word in self.title_blacklist)
|
||||||
company_blacklisted = company_lower in (word.lower() for word in self.company_blacklist)
|
company_blacklisted = company.strip().lower() in (word.strip().lower() for word in self.company_blacklist)
|
||||||
link_seen = link in self.seen_jobs
|
link_seen = link in self.seen_jobs
|
||||||
return title_blacklisted or company_blacklisted or link_seen
|
return title_blacklisted or company_blacklisted or link_seen
|
1
main.py
1
main.py
@ -32,6 +32,7 @@ class ConfigValidator:
|
|||||||
raise ConfigError(f"Error reading config file {config_yaml_path}: {exc}")
|
raise ConfigError(f"Error reading config file {config_yaml_path}: {exc}")
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
raise ConfigError(f"Config file not found: {config_yaml_path}")
|
raise ConfigError(f"Config file not found: {config_yaml_path}")
|
||||||
|
|
||||||
|
|
||||||
# Validate 'remote'
|
# Validate 'remote'
|
||||||
if 'remote' not in parameters or not isinstance(parameters['remote'], bool):
|
if 'remote' not in parameters or not isinstance(parameters['remote'], bool):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user