Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed capacity scraper to scrape from new URL #182

Merged
merged 2 commits into from
Jan 26, 2025
Merged

Conversation

JoshD94
Copy link
Contributor

@JoshD94 JoshD94 commented Jan 25, 2025

Overview

Fixed capacity scraper

Changes Made

Problem: The capacity scraper URL no longer works and capacity is zero for all facilities.
Solution: Found the new URL that the website references to obtain their data, grabbed the URL and created a new scraper
The new URL is this one: https://goboardapi.azurewebsites.net/api/FacilityCount/GetCountsByAccount?AccountAPIKey=355de24d-d0e4-4262-ae97-bc0c78b92839

Test Coverage

Tested locally and confirmed the scraped data is equivalent to the one displayed on the capacity website.

Copy link
Contributor

@Aayush-Agnihotri Aayush-Agnihotri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -6,8 +6,10 @@
# Base URL for Cornell Recreation Website
BASE_URL = "https://scl.cornell.edu/recreation/"

# The path for capacities
# The old path for capacities
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to leave the old path?

Copy link
Contributor

@sophiestrausberg sophiestrausberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@JoshD94 JoshD94 merged commit 864badc into master Jan 26, 2025
1 check passed
Copy link

sentry-io bot commented Jan 29, 2025

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ JSONDecodeError: Expecting value: line 1 column 1 (char 0) src.scrapers.capacities_scraper in fetch_capaci... View Issue

Did you find this useful? React with a 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants