Skip to content

Commit

Permalink
Updated requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
AtaTrkgl committed Jan 4, 2025
1 parent 356b965 commit d4e4622
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
beautifulsoup4==4.12.3
requests==2.27.1
rich==13.8.0
selenium==4.24.0
rich==13.9.4
selenium==4.27.1
tqdm==4.64.0
urllib3==1.26.9
webdriver_manager==4.0.2
7 changes: 2 additions & 5 deletions src/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,14 @@ def save_misc_data(data):
if __name__ == "__main__":
args = parser.parse_args()
t0 = perf_counter()
driver = None
driver = DriverManager.create_driver()

# Scrap Courses
if args.scrap_target == "course":
course_rows = CourseScraper(None).scrap_courses()
save_course_rows(course_rows)
# Scrap Course Plans
elif args.scrap_target == "course_plan":
driver = DriverManager.create_driver()
faculty_course_plans = CoursePlanScraper(driver).scrap_course_plans()
save_course_plans(faculty_course_plans)
# Scrap Building Codes and Programme Codes
Expand All @@ -149,12 +148,10 @@ def save_misc_data(data):
save_misc_data(data)
# Scrap Lessons
elif args.scrap_target == "lesson":
driver = DriverManager.create_driver()
lesson_rows = LessonScraper(driver).scrap_tables()
save_lesson_rows(lesson_rows)

if driver is not None:
DriverManager.kill_driver(driver)
DriverManager.kill_driver(driver)

t1 = perf_counter()
Logger.log_info(f"Scraping & Saving Completed in [green]{round(t1 - t0, 2)}[/green] seconds")

0 comments on commit d4e4622

Please sign in to comment.