mirror of
https://github.com/tubearchivist/tubearchivist.git
synced 2024-12-23 02:10:14 +00:00
handle 404 video sponsorblock, #526
This commit is contained in:
parent
41f6a03751
commit
d42bd612d0
@ -228,6 +228,10 @@ class VideoSponsorView(ApiBaseView):
|
|||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
|
|
||||||
self.get_document(video_id)
|
self.get_document(video_id)
|
||||||
|
if not self.response.get("data"):
|
||||||
|
message = {"message": "video not found"}
|
||||||
|
return Response(message, status=404)
|
||||||
|
|
||||||
sponsorblock = self.response["data"].get("sponsorblock")
|
sponsorblock = self.response["data"].get("sponsorblock")
|
||||||
|
|
||||||
return Response(sponsorblock)
|
return Response(sponsorblock)
|
||||||
|
Loading…
Reference in New Issue
Block a user