Skip to content

Commit

Permalink
feat: chromium browser path can now be specified
Browse files Browse the repository at this point in the history
  • Loading branch information
Holf committed Sep 30, 2024
1 parent 6f31df1 commit b9f8da3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion weduc_timetable_extractor/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from weduc_timetable_extractor import get_command_line_args
from weduc_timetable_extractor.config_management import (
get_chromium_path,
get_student_configs,
get_weduc_credentials,
)
Expand Down Expand Up @@ -39,7 +40,7 @@ def main():

print("Launching browser ...")

chromium_path = "/usr/bin/google-chrome"
chromium_path = get_chromium_path() or "/usr/bin/google-chrome"
browser = p.chromium.launch(
executable_path=chromium_path, headless=use_headless
)
Expand Down
4 changes: 4 additions & 0 deletions weduc_timetable_extractor/config_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ def get_weduc_credentials():
return credentials


def get_chromium_path():
return get_config_option(WEDUC_SECTION_NAME, "chromium_path")


def get_student_configs():
section_names = get_config().sections()
student_section_names = [
Expand Down

0 comments on commit b9f8da3

Please sign in to comment.