mirror of
https://github.com/Rushilwiz/auto-mdh.git
synced 2025-04-17 18:50:18 -04:00
fix: switch to headless
This commit is contained in:
parent
8e9d9ea4de
commit
6485607b17
4
mdh.py
4
mdh.py
|
@ -8,7 +8,7 @@ def start_shift(playwright: Playwright, end_hour: str, end_minute: str) -> None:
|
||||||
if int(end_hour) > 12:
|
if int(end_hour) > 12:
|
||||||
end_hour = str(int(end_hour) - 12)
|
end_hour = str(int(end_hour) - 12)
|
||||||
|
|
||||||
browser = playwright.chromium.launch(headless=False)
|
browser = playwright.chromium.launch(headless=True)
|
||||||
context = browser.new_context()
|
context = browser.new_context()
|
||||||
page = context.new_page()
|
page = context.new_page()
|
||||||
page.goto("https://beta.mydigitalhand.org/")
|
page.goto("https://beta.mydigitalhand.org/")
|
||||||
|
@ -54,7 +54,7 @@ def start_shift(playwright: Playwright, end_hour: str, end_minute: str) -> None:
|
||||||
browser.close()
|
browser.close()
|
||||||
|
|
||||||
def end_shift(playwright: Playwright) -> None:
|
def end_shift(playwright: Playwright) -> None:
|
||||||
browser = playwright.chromium.launch(headless=False)
|
browser = playwright.chromium.launch(headless=True)
|
||||||
context = browser.new_context()
|
context = browser.new_context()
|
||||||
page = context.new_page()
|
page = context.new_page()
|
||||||
page.goto("https://beta.mydigitalhand.org/")
|
page.goto("https://beta.mydigitalhand.org/")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user