diff --git a/app.py b/app.py index ac8f47e..055a97a 100644 --- a/app.py +++ b/app.py @@ -330,8 +330,8 @@ def proxy(video_id): logger.error(f"{video_id}: Failed to fetch data") return Response("Video not found", status=404) - reason_code = params.get('reasonCode', '').upper() - if reason_code in ['HIDDEN_VIDEO', 'ADMINISTRATOR_DELETE_VIDEO']: + reason_code = params.get('reasonCode') + if ('' or reason_code).upper() in ['HIDDEN_VIDEO', 'ADMINISTRATOR_DELETE_VIDEO']: logger.warning(f"{video_id}: Video is hidden or deleted ({reason_code}) - returning 404") return Response("Video not found", status=404)