diff --git a/config.yaml b/config.yaml index c549cd7..483220b 100644 --- a/config.yaml +++ b/config.yaml @@ -1,11 +1,17 @@ -username: # Insert your username here -password: # Insert your password here +username: +password: positions: -- # Position you want to search for +- # positions you want to search for - # Another position you want to search for - # A third position you want to search for locations: -- # Location you want to search in -- # A second location you want to search in \ No newline at end of file +- # Location you want to search for +- # A second location you want to search in + +cover_letter_loctn: +- # '/home/PATH_TO_FILE' + +output_filename: +- # PATH TO OUTPUT FILE (default output.csv) \ No newline at end of file diff --git a/easyapplybot.py b/easyapplybot.py index cc4b477..d6c6e32 100644 --- a/easyapplybot.py +++ b/easyapplybot.py @@ -374,9 +374,17 @@ def finish_apply(self): assert parameters['username'] is not None assert parameters['password'] is not None + + print(parameters) + cover_letter_loctn = parameters.get('cover_letter_loctn', [None])[0] + output_filename = parameters.get('output_filename', ['output.csv'])[0] + bot = EasyApplyBot(parameters['username'], parameters['password'], - parameters['locations'] + cover_letter_loctn=cover_letter_loctn, + filename=output_filename ) - bot.start_apply(parameters['positions'], parameters['locations']) \ No newline at end of file + locations = [l for l in parameters['locations'] if l != None] + positions = [p for p in parameters['positions'] if p != None] + bot.start_apply(positions, locations) \ No newline at end of file