Update backend.py

added check to see if content downloading is mp4 if not check next link.
This commit is contained in:
Arctic4161 2021-10-16 09:29:07 -05:00 committed by GitHub
parent bde87f1294
commit c24be4c4e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: