Handle deleted videos
This commit is contained in:
parent
19befc9eb5
commit
dd95661352
1 changed files with 2 additions and 2 deletions
4
app.py
4
app.py
|
@ -296,8 +296,8 @@ def proxy(video_id):
|
||||||
return Response("Video not found", status=404)
|
return Response("Video not found", status=404)
|
||||||
|
|
||||||
reason_code = params.get('reasonCode', '').upper()
|
reason_code = params.get('reasonCode', '').upper()
|
||||||
if reason_code in ['HIDDEN_VIDEO']:
|
if reason_code in ['HIDDEN_VIDEO', 'ADMINISTRATOR_DELETE_VIDEO']:
|
||||||
logger.warning(f"{video_id}: Video is hidden - returning 404")
|
logger.warning(f"{video_id}: Video is hidden or deleted")
|
||||||
return Response("Video not found", status=404)
|
return Response("Video not found", status=404)
|
||||||
|
|
||||||
thumbnail_url = (
|
thumbnail_url = (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue