Refactor OpenaiChat authentication flow; replace get_nodriver with async context manager and improve error handling

Update backend_anon_url in har_file.py for correct endpoint
Add async context manager for get_nodriver_session in requests module
Fix start-browser.sh to remove stale cookie file before launching Chrome
This commit is contained in:
hlohaus 2025-10-02 02:08:20 +02:00
parent 7d184411e2
commit 4399b432c4
4 changed files with 27 additions and 12 deletions

View file

@ -2,5 +2,5 @@
while true; do
sleep 5
rm ~/.config/g4f/cookies/.nodriver_is_open
google-chrome --remote-allow-origins=* --no-first-run --no-service-autorun --no-default-browser-check --homepage=about:blank --no-pings --password-store=basic --disable-infobars --disable-breakpad --disable-dev-shm-usage --disable-session-crashed-bubble --disable-search-engine-choice-screen --user-data-dir="~/.config/g4f-nodriver" --disable-session-crashed-bubble --disable-features=IsolateOrigins,site-per-process --no-sandbox --remote-debugging-host=127.0.0.1 --remote-debugging-port=57011
google-chrome --remote-allow-origins=* --no-first-run --no-service-autorun --no-default-browser-check --homepage=about:blank --no-pings --password-store=basic --disable-infobars --disable-breakpad --disable-dev-shm-usage --disable-session-crashed-bubble --disable-search-engine-choice-screen --user-data-dir="~/.config/g4f-nodriver" --disable-session-crashed-bubble --disable-features=IsolateOrigins,site-per-process --remote-debugging-host=127.0.0.1 --remote-debugging-port=57011
done