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
@ -33,6 +33,7 @@ class ConfigValidator:
|
|||||||
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):
|
||||||
raise ConfigError(f"'remote' in config file {config_yaml_path} must be a boolean value.")
|
raise ConfigError(f"'remote' in config file {config_yaml_path} must be a boolean value.")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user