mirror of
https://github.com/j93es/browser-use-oauth.git
synced 2026-06-14 03:36:45 +09:00
지금 일단 업데이트만 해뒀어요
This commit is contained in:
parent
09a91f9c7c
commit
e1ae2dc94f
9 changed files with 713 additions and 173 deletions
24
login.py.bak.bak
Normal file
24
login.py.bak.bak
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# run uv run playwright open https://google.com/ --user_data_dir=~/.config/browseruse/profiles/default in shell
|
||||
|
||||
from playwright.sync_api import sync_playwright
|
||||
import os
|
||||
|
||||
user_data_dir = os.path.expanduser("~/.config/browseruse/profiles/default")
|
||||
|
||||
with sync_playwright() as p:
|
||||
browser = p.chromium.launch_persistent_context(
|
||||
user_data_dir=user_data_dir,
|
||||
headless=False,
|
||||
)
|
||||
page = browser.new_page()
|
||||
page.goto("https://google.com")
|
||||
|
||||
# ctrl + c to exit
|
||||
print("Press Ctrl+C to exit...")
|
||||
try:
|
||||
while True:
|
||||
pass # Keep the script running
|
||||
except KeyboardInterrupt:
|
||||
print("Exiting...")
|
||||
finally:
|
||||
browser.close()
|
||||
Loading…
Add table
Add a link
Reference in a new issue