fixed cleanup function
This commit is contained in:
@@ -337,7 +337,11 @@ Mercredi 29.11, 14:45</p>
|
||||
|
||||
|
||||
|
||||
<p align="justify">
|
||||
<p align="justify"><a
|
||||
|
||||
href="https://www.3continents.com/fr/programme/2023/anthologie-du-cinema-vietnamien/"
|
||||
|
||||
target="_blank">
|
||||
https://www.3continents.com/fr/programme/2023/anthologie-du-cinema-vietnamien/</a></p>
|
||||
|
||||
|
||||
@@ -346,8 +350,9 @@ https://www.3continents.com/fr/programme/2023/anthologie-du-cinema-vietnamien/</
|
||||
|
||||
|
||||
|
||||
<p align="justify">
|
||||
https://www.3continents.com/wp-content/uploads/f3c-prog-2023-40p-net-planche.pdf</a></p>
|
||||
<p align="justify"><a
|
||||
|
||||
href="https://www.3continents.com/wp-content/uploads/f3c-prog-2023-40p-net-planche.pdf">https://www.3continents.com/wp-content/uploads/f3c-prog-2023-40p-net-planche.pdf</a></p>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>untitled</title>
|
||||
</head>
|
||||
@@ -1,5 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>untitled</title>
|
||||
</head>
|
||||
@@ -1,11 +1 @@
|
||||
2023-11-29 17:22:16 [ Nantes_anthologie_cinema_viet.htm ] *** Cleanup réussi. ***
|
||||
2023-11-29 17:23:56 [ Screenshot 2023-11-20 at 12.07.54.png ] Le format du fichier n'est pas valide. Téléchargement refusé.
|
||||
30-11-2023 17:29 [ Nantes_anthologie_cinema_viet.htm ] *** Cleanup réussi. ***
|
||||
30-11-2023 18:32 [ www.icloud.com.html ] *** Cleanup réussi. ***
|
||||
02-12-2023 10:41 [ Nantes_anthologie_cinema_viet.htm ] Le format du fichier n'est pas valide (absence de tag <body> ou </body>). Téléchargement refusé.
|
||||
02-12-2023 10:44 [ Nantes_anthologie_cinema_viet.htm ] *** Cleanup réussi. ***
|
||||
02-12-2023 10:45 [ cleanup_html.vbs.txt ] Le format du fichier n'est pas valide (absence de tag <body> ou </body>). Téléchargement refusé.
|
||||
02-12-2023 10:49 [ Nantes_anthologie_cinema_viet.htm ] *** Cleanup réussi. ***
|
||||
02-12-2023 11:02 [ Nantes_anthologie_cinema_viet copy.htm ] *** Cleanup réussi. ***
|
||||
02-12-2023 11:10 [ Nantes_anthologie_cinema_viet copy.htm ] *** Cleanup réussi. ***
|
||||
02-12-2023 11:11 [ Nantes_anthologie_cinema_viet.htm ] *** Cleanup réussi. ***
|
||||
03-12-2023 10:35 [ Nantes_anthologie_cinema_viet.htm ] *** Cleanup réussi. ***
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
{% if not lines %}
|
||||
<div class="form-group">
|
||||
<input type="text" name="username" class="form-control" placeholder="Identifiant Zidol">
|
||||
<input type="text" name="username" class="form-control" placeholder="Identifiant ZD">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
@@ -136,13 +136,19 @@ def clean_html(input_file, output_file):
|
||||
done = True
|
||||
skip_tag = False
|
||||
|
||||
tag = s.split(" ")
|
||||
tag = s.split()
|
||||
|
||||
if tag:
|
||||
tag[0] = tag[0].lower()
|
||||
|
||||
if tag[0] in ["table", "div", "img", "a"]:
|
||||
line_out += "<{}>".format(s)
|
||||
line_out += "<{}".format(s)
|
||||
if end_tag > 0:
|
||||
# si end tag trouvé, fermer
|
||||
line_out += ">"
|
||||
else:
|
||||
# sinon contine de recopier la ligne
|
||||
skip_tag = False
|
||||
elif tag[0] in ["p"]:
|
||||
line_out += "<p align=\"justify\">"
|
||||
elif tag[0] in ["b", "/b", "em", "/em", "i", "/i", "li", "li/", "/li",
|
||||
@@ -195,6 +201,7 @@ def view_log(request):
|
||||
lines = file.readlines()
|
||||
file.close()
|
||||
except Exception as e:
|
||||
message = "Le fichier Journal est vide !"
|
||||
pass
|
||||
|
||||
# lire tous les fichiers du dossier triés par date
|
||||
|
||||
Reference in New Issue
Block a user