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