feat: DeepSeek API + transcript fixes; add OAuth captions scope
This commit is contained in:
+7
-1
@@ -6,7 +6,10 @@ from google_auth_oauthlib.flow import InstalledAppFlow
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
SCOPES = ["https://www.googleapis.com/auth/youtube.readonly"]
|
||||
SCOPES = [
|
||||
"https://www.googleapis.com/auth/youtube.readonly",
|
||||
"https://www.googleapis.com/auth/youtube.force-ssl"
|
||||
]
|
||||
CONFIG_DIR = os.environ.get("CONFIG_DIR", "/app/config")
|
||||
_local_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
_local_config = os.path.join(os.path.dirname(_local_dir), "config")
|
||||
@@ -34,6 +37,9 @@ def get_credentials():
|
||||
"Download from Google Cloud Console."
|
||||
)
|
||||
flow = InstalledAppFlow.from_client_secrets_file(CLIENT_SECRET, SCOPES)
|
||||
# Print URL for manual opening
|
||||
auth_url, _ = flow.authorization_url(prompt='consent', access_type='offline')
|
||||
print(f"\nOpen this URL in your browser:\n{auth_url}\n")
|
||||
creds = flow.run_local_server(port=0)
|
||||
|
||||
os.makedirs(os.path.dirname(TOKEN_FILE), exist_ok=True)
|
||||
|
||||
Reference in New Issue
Block a user