diff --git a/.github/workflows/refresh_course_plans.yml b/.github/workflows/refresh_course_plans.yml index b79e673..1aaa647 100644 --- a/.github/workflows/refresh_course_plans.yml +++ b/.github/workflows/refresh_course_plans.yml @@ -44,13 +44,13 @@ jobs: run: | python src/run.py -scrap_target course_plan - # Commits the changes back to the data repo - - name: Push course_plans.txt to Data - uses: dmnemec/copy_file_to_another_repo_action@main - env: - API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} - with: - source_file: './data/course_plans.txt' - destination_repo: 'itu-helper/data' - user_email: 'data-updater@itu-helper.com' - user_name: 'ITU Helper' + # # Commits the changes back to the data repo + # - name: Push course_plans.txt to Data + # uses: dmnemec/copy_file_to_another_repo_action@main + # env: + # API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} + # with: + # source_file: './data/course_plans.txt' + # destination_repo: 'itu-helper/data' + # user_email: 'data-updater@itu-helper.com' + # user_name: 'ITU Helper' diff --git a/src/constants.py b/src/constants.py index 8accada..ca552e7 100644 --- a/src/constants.py +++ b/src/constants.py @@ -14,4 +14,3 @@ # === OTHER === MAX_THREAD_COUNT = 4 -MAX_THREAD_COUNT_COURSE_PLANS = 2 diff --git a/src/course_plan_scraper.py b/src/course_plan_scraper.py index 2f23efe..9f9715a 100644 --- a/src/course_plan_scraper.py +++ b/src/course_plan_scraper.py @@ -211,7 +211,8 @@ def scrap_faculty_course_plans(self, faculty_name: str, driver, log_prefix: str= else: self.faculty_course_plans[faculty_name][program_type_name].update(program_data) - driver.back() + driver.execute_script("window.history.back();") + # driver.back() Logger.log_info(f"{log_prefix} Finished Scraping The Faculty: [blue]\"{faculty_name}\"[/blue]") @@ -344,7 +345,7 @@ def scrap_course_plans(self): # Create the threads threads = [] - for i in range(min(MAX_THREAD_COUNT_COURSE_PLANS, len(self.faculties))): + for i in range(min(MAX_THREAD_COUNT, len(self.faculties))): t = threading.Thread(target=self.scrap_course_plan_thread_routine, args=(i,)) threads.append(t)