Skip to content

Commit

Permalink
Merge pull request nicolomantini#10 from krapes/blacklist
Browse files Browse the repository at this point in the history
Feature: Breakout blacklist feature to the config file
  • Loading branch information
krapes authored Jul 13, 2020
2 parents c56b755 + e628c37 commit ab43921
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ cover_letter_loctn:

output_filename:
- # PATH TO OUTPUT FILE (default output.csv)

blacklist:
- # Company names you want to ignore
```
__NOTE: AFTER EDITING SAVE FILE, DO NOT COMMIT FILE__

Expand Down
5 changes: 4 additions & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ cover_letter_loctn:
- # '/home/PATH_TO_FILE'

output_filename:
- # PATH TO OUTPUT FILE (default output.csv)
- # PATH TO OUTPUT FILE (default output.csv)

blacklist:
- # Company names you want to ignore
13 changes: 10 additions & 3 deletions easyapplybot.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,15 @@ class EasyApplyBot:


MAX_SEARCH_TIME = 10*60
blacklist = ["Staffigo"]


def __init__(self, username, password, cover_letter_loctn=None, filename='output.csv'):

def __init__(self,
username,
password,
cover_letter_loctn=None,
filename='output.csv',
blacklist=[]):

print("\nWelcome to Easy Apply Bot\n")
dirpath = os.getcwd()
Expand Down Expand Up @@ -378,11 +383,13 @@ def finish_apply(self):
print(parameters)
cover_letter_loctn = parameters.get('cover_letter_loctn', [None])[0]
output_filename = parameters.get('output_filename', ['output.csv'])[0]
blacklist = parameters.get('blacklist', [])

bot = EasyApplyBot(parameters['username'],
parameters['password'],
cover_letter_loctn=cover_letter_loctn,
filename=output_filename
filename=output_filename,
blacklist=blacklist
)

locations = [l for l in parameters['locations'] if l != None]
Expand Down

0 comments on commit ab43921

Please sign in to comment.