mirror of
https://github.com/j93es/browser-use-oauth.git
synced 2026-06-04 06:21:52 +09:00
13 lines
No EOL
514 B
Python
13 lines
No EOL
514 B
Python
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") |