Skip to content

Commit

Permalink
add some continue statements to move for loop if company breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
adgramigna committed Jan 22, 2024
1 parent c5a8e50 commit dd9dcab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion job_board_scraper/get_ashby_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,9 @@ class Team(Struct):

response_text = response.text
response_json = json.loads(response_text)
if response_json["data"]["jobBoard"] == None:
if response_json["data"]["jobBoard"] is None:
logger.error(f"No data for {ashby_company}")
continue
else:
logger.info(f"Got data for {ashby_company}")

Expand All @@ -183,6 +184,7 @@ class Team(Struct):
logger.error(
f"An error occurred for company '{ashby_company}'. Perhaps you have the wrong Ashby company name"
)
continue

# secondaryLocations list
all_postings_json = []
Expand Down Expand Up @@ -278,6 +280,7 @@ class Team(Struct):
logger.error(
f"An error occurred for company '{ashby_company}'. Perhaps you have the wrong Ashby company name"
)
continue

all_teams_json = []
for j, record in enumerate(team_data):
Expand Down

0 comments on commit dd9dcab

Please sign in to comment.