diff --git a/backend/penndata/management/commands/get_rodin_events.py b/backend/penndata/management/commands/get_rodin_events.py index 6daa3cbb..8998c635 100644 --- a/backend/penndata/management/commands/get_rodin_events.py +++ b/backend/penndata/management/commands/get_rodin_events.py @@ -11,8 +11,7 @@ RODIN_EVENTS_WEBSITE = "https://rodin.house.upenn.edu" HEADERS = { - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Apple" + - "WebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36" + "User-Agent": "Mozilla/5.0 AppleWebKit/537.36 Chrome/91.0.4472.124 Safari/537.36" } diff --git a/backend/penndata/management/commands/get_venture_events.py b/backend/penndata/management/commands/get_venture_events.py index 95b9bb8c..a2a9ecbc 100644 --- a/backend/penndata/management/commands/get_venture_events.py +++ b/backend/penndata/management/commands/get_venture_events.py @@ -12,8 +12,7 @@ VENTURE_EVENTS_WEBSITE = "https://venturelab.upenn.edu/venture-lab-events" HEADERS = { - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Apple" + - "WebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36" + "User-Agent": "Mozilla/5.0 AppleWebKit/537.36 Chrome/91.0.4472.124 Safari/537.36" } @@ -26,7 +25,7 @@ def handle(self, *args, **kwargs): resp = requests.get(VENTURE_EVENTS_WEBSITE, headers=HEADERS) except ConnectionError: return None - + soup = BeautifulSoup(resp.text, "html.parser") event_containers = soup.find_all("div", class_="PromoSearchResultEvent")