Skip to content

Commit c508cea

Browse files
committed
Change location of SIS scraper data to be relative
Before, it would create a "data" folder at the current working directory; this has now been changed to create one in the same directory as the scraper file.
1 parent 165f0ef commit c508cea

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/scrapers/sis_scraper.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
from . import scraper_utils
1414

15+
_OUTPUT_DATA_DIR = os.path.join(os.path.dirname(__file__), "scraper_data")
1516
_is_scraper_running = False
1617

1718

@@ -523,8 +524,8 @@ async def main() -> None:
523524
logger.info("Cannot run scraper as it is already running")
524525
return False
525526
_is_scraper_running = True
526-
if not os.path.exists("./data"):
527-
os.makedirs("./data")
527+
if not os.path.exists(_OUTPUT_DATA_DIR):
528+
os.makedirs(_OUTPUT_DATA_DIR)
528529
total_start = time.time()
529530
start_year = 2024
530531
end_year = 2025

0 commit comments

Comments
 (0)