Mise à jour de 'app.py'

Correction d'un problème suite au retrait de deux champs d'entrées sur index.html
This commit is contained in:
guillaume 2023-06-05 22:30:23 +02:00
parent 9b04348b32
commit 2924550be6

6
app.py
View File

@ -36,13 +36,11 @@ def download_file():
url1 = request.form['url1']
url2 = request.form['url2']
url3 = request.form['url3']
url4 = request.form['url4']
url5 = request.form['url5']
urls = [url1, url2, url3, url4, url5]
urls = [url1, url2, url3]
# Vérifier si au moins un champ est vide
if not url1 and not url2 and not url3 and not url4 and not url5:
if not url1 and not url2 and not url3 :
return render_template('erreur.html')
# Créer le dossier 'downloads' s'il n'existe pas