From c24be4c4e9f137d7e132373d5bfb1529017bf46d Mon Sep 17 00:00:00 2001 From: Arctic4161 <64910295+Arctic4161@users.noreply.github.com> Date: Sat, 16 Oct 2021 09:29:07 -0500 Subject: [PATCH] Update backend.py added check to see if content downloading is mp4 if not check next link. --- src/backend.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/backend.py b/src/backend.py index d5feba3..991299b 100644 --- a/src/backend.py +++ b/src/backend.py @@ -103,6 +103,8 @@ class Download: timeout=3) as workingit: if workingit.status_code != 200: link = None + elif workingit.headers['Content-Type'] != 'video/mp4': + link = None except Timeout: link = None if link is None: @@ -123,6 +125,8 @@ class Download: timeout=3) as workingit: if workingit.status_code != 200: link = None + elif workingit.headers['Content-Type'] != 'video/mp4': + link = None except Timeout: link = None if link is None: