Skip to content

Commit

Permalink
headers
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleyzhang01 committed Mar 6, 2024
1 parent a376c98 commit 50c9814
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions backend/penndata/management/commands/get_rodin_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}


Expand Down
5 changes: 2 additions & 3 deletions backend/penndata/management/commands/get_venture_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}


Expand All @@ -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")
Expand Down

0 comments on commit 50c9814

Please sign in to comment.