mirror of
https://github.com/j93es/browser-use-oauth.git
synced 2026-06-04 08:01:51 +09:00
[Update]
This commit is contained in:
parent
92967ed353
commit
495b3a52da
5 changed files with 161 additions and 30 deletions
13
lib/utils/save_oauth_providers.py
Normal file
13
lib/utils/save_oauth_providers.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import csv
|
||||
import os
|
||||
|
||||
def save_oauth_providers(url, oauth_entries):
|
||||
csv_file = "./oauth_providers.csv"
|
||||
file_exists = os.path.isfile(csv_file)
|
||||
with open(csv_file, "a", newline="", encoding="utf-8") as f:
|
||||
writer = csv.writer(f)
|
||||
if not file_exists:
|
||||
writer.writerow(["issuer", "provider", "oauth_uri"])
|
||||
for entry in oauth_entries:
|
||||
writer.writerow([url, entry.provider or None, entry.oauth_uri or None])
|
||||
print(f"✅ OAuth providers saved to {csv_file}\n")
|
||||
Loading…
Add table
Add a link
Reference in a new issue