Describe the bug
On Feb 03, the program wasn't able to post any of jobs due the locations being described as SF and NYC.
To Reproduce
Steps to reproduce the behavior:
Prove a step by step guide on how to reproduce this problem
Within InternshipUtilities.py, change the python date = "Feb 03 for methods getSummerInternships() and getCoopInternships()
Remove all the discord comments to not spam the chat in DicordBot.py
Expected behavior
What we expect to happen is the bot is able to post the job with the location. This can only be done if the following logic within each method is fixed.
# If there are multiple locations, we need to populate the string correctly
if len(list_locations) > 1:
location = " | ".join(list_locations)
else:
is_remote = bool(
re.search(r"(?i)\bremote\b", non_empty_elements[2])
)
location = "Remote" if is_remote else non_empty_elements[2]
if location != "Remote":
# The error is right here! The regex is not working as expected
# We need to check for State, acryonm of major cities, and the full name of major cities, and (US, USA, United States)
match = re.search(r",\s*(.+)", location)
us_state = match.group(1) if match else match
if not us_state or not self.binarySearchUS(us_state):
continue
Desktop (please complete the following information):
Describe the bug On Feb 03, the program wasn't able to post any of jobs due the locations being described as
SF
andNYC
.To Reproduce Steps to reproduce the behavior: Prove a step by step guide on how to reproduce this problem
InternshipUtilities.py
, change thepython date = "Feb 03
for methodsgetSummerInternships()
andgetCoopInternships()
DicordBot.py
Expected behavior What we expect to happen is the bot is able to post the job with the location. This can only be done if the following logic within each method is fixed.
Desktop (please complete the following information):