Update app.py
Browse files32 unmodified lines33343536363738393839404142414344454647484950515253464754555632 unmodified lines authed_session = google.auth.transport.requests.AuthorizedSession(credentials)
project_id = service_account_info["project_id"] app_id = os.environ.get("FIREBASE_APP_ID") app_ids = os.environ.get("FIREBASE_APP_IDS", "").split(",")
url = f"https://firebaseappcheck.googleapis.com/v1/projects/{project_id}/apps/{app_id}:verifyAppCheckToken" response = authed_session.post(url, json={"appCheckToken": app_check_token}) for app_id in app_ids: app_id = app_id.strip() if not app_id: continue
return response.status_code == 200 url = f"https://firebaseappcheck.googleapis.com/v1/projects/{project_id}/apps/{app_id}:verifyAppCheckToken" response = authed_session.post(url, json={"appCheckToken": app_check_token})
if response.status_code == 200: return True
return False except Exception as e: print(f"App Check validation error: {e}") return False
def download_video_audio_and_metadata(url: str) -> tuple[str, str, str]: temp_filename = f"/tmp/{uuid.uuid4()}.mp3" try:app.py+12-6