Cleanup + Use API instead of scraping

This commit is contained in:
Mathias DUPEUX 2024-09-18 18:41:31 +02:00
parent ea9f4d79b0
commit 9deeb46e0c
27 changed files with 2026 additions and 2504 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
__pycache__/

View file

@ -1,5 +0,0 @@
Clé API
###
Jeton d'accès en lecture à l'API :
###

866
app.py
View file

@ -1,770 +1,124 @@
from flask import Flask, render_template, request
from datetime import datetime
from flask_caching import Cache
import asyncio
from datetime import datetime, timedelta
# IMPORT DES MODULES
from modules.date import chiffre_intoMonth, anglais_intoJourFrancais, testChiffreJour, testMoisNumero
from modules.scraping import scrap_infoFilm, get_data, cleanFilms
from modules.urlGenerator import decalageDate
from modules.Classes import *
cinemas = {
"C0071": "Écoles Cinéma Club",
"C2954": "MK2 Bibliothèque",
"C0050": "MK2 Beaubourg",
"W7504": "Épée de bois",
"C0076": "Cinéma du Panthéon",
"C0089": "Max Linder Panorama",
"C0013": "Luminor Hotel de Ville",
"C0072": "Le Grand Action",
"C0099": "MK2 Parnasse",
"C0073": "Le Champo",
"C0020": "Filmothèque du Quartier Latin",
"C0074": "Reflet Medicis",
"C0159": "UGC Ciné Cité Les Halles",
"C0026": "UGC Ciné Cité Bercy"
}
theaters: list[Theater] = []
for id, name in cinemas.items():
theaters.append(Theater({
"name": name,
"internalId": id,
"location": None
}))
def getShowtimes(date):
showtimes:list[Showtime] = []
for theater in theaters:
showtimes.extend(theater.getShowtimes(date))
data = {}
for showtime in showtimes:
movie = showtime.movie
theater = showtime.theater
if showtime.movie.title not in data.keys():
data[movie.title] = {
"title": movie.title,
"duree": movie.runtime,
"genres": ", ".join(movie.genres),
"casting": ", ".join(movie.cast),
"realisateur": movie.director,
"synopsis": movie.synopsis,
"affiche": movie.affiche,
"director": movie.director,
"seances": {}
}
if theater.name not in data[movie.title]["seances"].keys():
data[movie.title]["seances"][theater.name] = []
data[movie.title]["seances"][theater.name].append(showtime.startsAt.strftime("%H:%M"))
return data
showtimes = getShowtimes(datetime.today()+timedelta(days=1))
print("Séances récupéré!")
import json
with open("tmp.json", "w+", encoding="utf-8") as f:
json.dump(showtimes, f, ensure_ascii=False, indent=4)
app = Flask(__name__)
cache = Cache(app, config={'CACHE_TYPE': 'simple'})
def translateMonth(num: int):
match num:
case 1: return "janv"
case 2: return "févr"
case 3: return "mars"
case 4: return "avr"
case 5: return "mai"
case 6: return "juin"
case 7: return "juil"
case 8: return "août"
case 9: return "sept"
case 10: return "oct"
case 11: return "nov"
case 12: return "déc"
case _: return "???"
def translateDay(weekday: int):
match weekday:
case 0: return "lun"
case 1: return "mar"
case 2: return "mer"
case 3: return "jeu"
case 4: return "ven"
case 5: return "sam"
case 6: return "dim"
case _: return "???"
@app.route('/')
@cache.cached(timeout=3600)
@app.route('/index')
def home():
date = {
"jour1" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 0),
"chiffre" : testChiffreJour(datetime.today().day, 0),
"mois" : testMoisNumero(datetime.today().day, 0)
},
"jour2" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 1),
"chiffre" : testChiffreJour(datetime.today().day, 1),
"mois" : testMoisNumero(datetime.today().day, 1)
},
"jour3" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 2),
"chiffre" : testChiffreJour(datetime.today().day, 2),
"mois" : testMoisNumero(datetime.today().day, 2)
},
"jour4" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 3),
"chiffre" : testChiffreJour(datetime.today().day, 3),
"mois" : testMoisNumero(datetime.today().day, 3)
},
"jour5" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 4),
"chiffre" : testChiffreJour(datetime.today().day, 4),
"mois" : testMoisNumero(datetime.today().day, 4)
},
"jour6" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 5),
"chiffre" : testChiffreJour(datetime.today().day, 5),
"mois" : testMoisNumero(datetime.today().day, 5)
},
"jour7" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 6),
"chiffre" : testChiffreJour(datetime.today().day, 6),
"mois" : testMoisNumero(datetime.today().day, 6)
}
}
delta = request.args.get("delta", default=0, type=int)
cinemas = [
{
"salle" : "Écoles Cinéma Club",
"url" : "https://www.allocine.fr/seance/salle_gen_csalle=C0071.html"
},
{
"salle" : "MK2 Bibliothèque",
"url" : "https://www.allocine.fr/seance/salle_gen_csalle=C2954.html",
},
{
"salle" : "MK2 Beaubourg",
"url" : "https://www.allocine.fr/seance/salle_gen_csalle=C0050.html"
},
{
"salle" : "Épée de bois",
"url" : "https://www.allocine.fr/seance/salle_gen_csalle=W7504.html"
},
{
"salle" : "Cinéma du Panthéon",
"url" : "https://www.allocine.fr/seance/salle_gen_csalle=C0076.html"
},
{
"salle" : "Max Linder Panorama",
"url" : "https://www.allocine.fr/seance/salle_gen_csalle=C0089.html"
},
{
"salle" : "Luminor Hotel de Ville",
"url" : "https://www.allocine.fr/seance/salle_gen_csalle=C0013.html"
},
{
"salle" : "Le Grand Action",
"url" : "https://www.allocine.fr/seance/salle_gen_csalle=C0072.html"
},
{
"salle" : "MK2 Parnasse",
"url" : "https://www.allocine.fr/seance/salle_gen_csalle=C0099.html"
},
{
"salle" : "Le Champo",
"url" : "https://www.allocine.fr/seance/salle_gen_csalle=C0073.html"
},
{
"salle" : "Filmothèque du Quartier Latin",
"url" : "https://www.allocine.fr/seance/salle_gen_csalle=C0020.html"
},
{
"salle" : "Reflet Medicis",
"url" : "https://www.allocine.fr/seance/salle_gen_csalle=C0074.html"
},
{
"salle" : "UGC Ciné Cité Les Halles",
"url" : "https://www.allocine.fr/seance/salle_gen_csalle=C0159.html"
},
{
"salle" : "UGC Ciné Cité Bercy",
"url" : "https://www.allocine.fr/seance/salle_gen_csalle=C0026.html"
}
]
if delta > 6: delta = 6
if delta < 0: delta = 0
films = get_data(cinemas)
filmsClean = cleanFilms(films)
dates = []
return render_template('index.html', page_actuelle='home', films=filmsClean, date=date)
for i in range(0,7):
day = datetime.today()+timedelta(i+delta)
dates.append({
"jour": translateDay(day.weekday()),
"chiffre": day.day,
"mois": translateMonth(day.month),
"choisi": i==delta,
"index": i
})
return render_template('index.html', page_actuelle='home', films=showtimes, dates=dates)
@app.route('/jour1')
@cache.cached(timeout=3600)
def jour1():
date = {
"jour1" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 0),
"chiffre" : testChiffreJour(datetime.today().day, 0),
"mois" : testMoisNumero(datetime.today().day, 0)
},
"jour2" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 1),
"chiffre" : testChiffreJour(datetime.today().day, 1),
"mois" : testMoisNumero(datetime.today().day, 1)
},
"jour3" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 2),
"chiffre" : testChiffreJour(datetime.today().day, 2),
"mois" : testMoisNumero(datetime.today().day, 2)
},
"jour4" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 3),
"chiffre" : testChiffreJour(datetime.today().day, 3),
"mois" : testMoisNumero(datetime.today().day, 3)
},
"jour5" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 4),
"chiffre" : testChiffreJour(datetime.today().day, 4),
"mois" : testMoisNumero(datetime.today().day, 4)
},
"jour6" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 5),
"chiffre" : testChiffreJour(datetime.today().day, 5),
"mois" : testMoisNumero(datetime.today().day, 5)
},
"jour7" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 6),
"chiffre" : testChiffreJour(datetime.today().day, 6),
"mois" : testMoisNumero(datetime.today().day, 6)
}
}
films = []
cinemas = [
{
"salle" : "Écoles Cinéma Club",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0071.html#shwt_date=", 1)
},
{
"salle" : "MK2 Bibliothèque",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C2954.html#shwt_date=l",1)
},
{
"salle" : "MK2 Beaubourg",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0050.html#shwt_date=",1)
},
{
"salle" : "Épée de bois",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=W7504.html#shwt_date=",1)
},
{
"salle" : "Cinéma du Panthéon",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0076.html#shwt_date=",1)
},
{
"salle" : "Max Linder Panorama",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0089.html#shwt_date=",1)
},
{
"salle" : "Luminor Hotel de Ville",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0013.html#shwt_date=",1)
},
{
"salle" : "Le Grand Action",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0072.html#shwt_date=",1)
},
{
"salle" : "MK2 Parnasse",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0099.html#shwt_date=",1)
},
{
"salle" : "Le Champo",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0073.html#shwt_date=",1)
},
{
"salle" : "Filmothèque du Quartier Latin",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0020.html#shwt_date=",1)
},
{
"salle" : "Reflet Medicis",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0074.html#shwt_date=",1)
},
{
"salle" : "UGC Ciné Cité Les Halles",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0159.html#shwt_date=",1)
},
{
"salle" : "UGC Ciné Cité Bercy",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0026.html#shwt_date=",1)
}
]
films = get_data(cinemas)
filmsClean = cleanFilms(films)
return render_template('jours/jour1.html', page_actuelle='jour1', films=filmsClean, date=date)
@app.route('/jour2')
@cache.cached(timeout=3600)
def jour2():
date = {
"jour1" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 0),
"chiffre" : testChiffreJour(datetime.today().day, 0),
"mois" : testMoisNumero(datetime.today().day, 0)
},
"jour2" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 1),
"chiffre" : testChiffreJour(datetime.today().day, 1),
"mois" : testMoisNumero(datetime.today().day, 1)
},
"jour3" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 2),
"chiffre" : testChiffreJour(datetime.today().day, 2),
"mois" : testMoisNumero(datetime.today().day, 2)
},
"jour4" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 3),
"chiffre" : testChiffreJour(datetime.today().day, 3),
"mois" : testMoisNumero(datetime.today().day, 3)
},
"jour5" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 4),
"chiffre" : testChiffreJour(datetime.today().day, 4),
"mois" : testMoisNumero(datetime.today().day, 4)
},
"jour6" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 5),
"chiffre" : testChiffreJour(datetime.today().day, 5),
"mois" : testMoisNumero(datetime.today().day, 5)
},
"jour7" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 6),
"chiffre" : testChiffreJour(datetime.today().day, 6),
"mois" : testMoisNumero(datetime.today().day, 6)
}
}
films = []
cinemas = [
{
"salle" : "Écoles Cinéma Club",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0071.html#shwt_date=", 2)
},
{
"salle" : "MK2 Bibliothèque",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C2954.html#shwt_date=l",2)
},
{
"salle" : "MK2 Beaubourg",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0050.html#shwt_date=",2)
},
{
"salle" : "Épée de bois",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=W7504.html#shwt_date=",2)
},
{
"salle" : "Cinéma du Panthéon",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0076.html#shwt_date=",2)
},
{
"salle" : "Max Linder Panorama",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0089.html#shwt_date=",2)
},
{
"salle" : "Luminor Hotel de Ville",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0013.html#shwt_date=",2)
},
{
"salle" : "Le Grand Action",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0072.html#shwt_date=",2)
},
{
"salle" : "MK2 Parnasse",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0099.html#shwt_date=",2)
},
{
"salle" : "Le Champo",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0073.html#shwt_date=",2)
},
{
"salle" : "Filmothèque du Quartier Latin",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0020.html#shwt_date=",2)
},
{
"salle" : "Reflet Medicis",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0074.html#shwt_date=",2)
},
{
"salle" : "UGC Ciné Cité Les Halles",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0159.html#shwt_date=",2)
},
{
"salle" : "UGC Ciné Cité Bercy",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0026.html#shwt_date=",2)
}
]
films = get_data(cinemas)
filmsClean = cleanFilms(films)
return render_template('jours/jour2.html', page_actuelle='jour2', films=filmsClean, date=date)
@app.route('/jour3')
@cache.cached(timeout=3600)
def jour3():
date = {
"jour1" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 0),
"chiffre" : testChiffreJour(datetime.today().day, 0),
"mois" : testMoisNumero(datetime.today().day, 0)
},
"jour2" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 1),
"chiffre" : testChiffreJour(datetime.today().day, 1),
"mois" : testMoisNumero(datetime.today().day, 1)
},
"jour3" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 2),
"chiffre" : testChiffreJour(datetime.today().day, 2),
"mois" : testMoisNumero(datetime.today().day, 2)
},
"jour4" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 3),
"chiffre" : testChiffreJour(datetime.today().day, 3),
"mois" : testMoisNumero(datetime.today().day, 3)
},
"jour5" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 4),
"chiffre" : testChiffreJour(datetime.today().day, 4),
"mois" : testMoisNumero(datetime.today().day, 4)
},
"jour6" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 5),
"chiffre" : testChiffreJour(datetime.today().day, 5),
"mois" : testMoisNumero(datetime.today().day, 5)
},
"jour7" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 6),
"chiffre" : testChiffreJour(datetime.today().day, 6),
"mois" : testMoisNumero(datetime.today().day, 6)
}
}
films = []
cinemas = [
{
"salle" : "Écoles Cinéma Club",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0071.html#shwt_date=", 3)
},
{
"salle" : "MK2 Bibliothèque",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C2954.html#shwt_date=l",3)
},
{
"salle" : "MK2 Beaubourg",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0050.html#shwt_date=",3)
},
{
"salle" : "Épée de bois",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=W7504.html#shwt_date=",3)
},
{
"salle" : "Cinéma du Panthéon",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0076.html#shwt_date=",3)
},
{
"salle" : "Max Linder Panorama",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0089.html#shwt_date=",3)
},
{
"salle" : "Luminor Hotel de Ville",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0013.html#shwt_date=",3)
},
{
"salle" : "Le Grand Action",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0072.html#shwt_date=",3)
},
{
"salle" : "MK2 Parnasse",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0099.html#shwt_date=",3)
},
{
"salle" : "Le Champo",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0073.html#shwt_date=",3)
},
{
"salle" : "Filmothèque du Quartier Latin",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0020.html#shwt_date=",3)
},
{
"salle" : "Reflet Medicis",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0074.html#shwt_date=",3)
},
{
"salle" : "UGC Ciné Cité Les Halles",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0159.html#shwt_date=",3)
},
{
"salle" : "UGC Ciné Cité Bercy",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0026.html#shwt_date=",3)
}
]
films = get_data(cinemas)
filmsClean = cleanFilms(films)
return render_template('jours/jour3.html', page_actuelle='jour3', films=filmsClean, date=date)
@app.route('/jour4')
@cache.cached(timeout=3600)
def jour4():
date = {
"jour1" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 0),
"chiffre" : testChiffreJour(datetime.today().day, 0),
"mois" : testMoisNumero(datetime.today().day, 0)
},
"jour2" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 1),
"chiffre" : testChiffreJour(datetime.today().day, 1),
"mois" : testMoisNumero(datetime.today().day, 1)
},
"jour3" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 2),
"chiffre" : testChiffreJour(datetime.today().day, 2),
"mois" : testMoisNumero(datetime.today().day, 2)
},
"jour4" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 3),
"chiffre" : testChiffreJour(datetime.today().day, 3),
"mois" : testMoisNumero(datetime.today().day, 3)
},
"jour5" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 4),
"chiffre" : testChiffreJour(datetime.today().day, 4),
"mois" : testMoisNumero(datetime.today().day, 4)
},
"jour6" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 5),
"chiffre" : testChiffreJour(datetime.today().day, 5),
"mois" : testMoisNumero(datetime.today().day, 5)
},
"jour7" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 6),
"chiffre" : testChiffreJour(datetime.today().day, 6),
"mois" : testMoisNumero(datetime.today().day, 6)
}
}
films = []
cinemas = [
{
"salle" : "Écoles Cinéma Club",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0071.html#shwt_date=", 4)
},
{
"salle" : "MK2 Bibliothèque",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C2954.html#shwt_date=l",4)
},
{
"salle" : "MK2 Beaubourg",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0050.html#shwt_date=",4)
},
{
"salle" : "Épée de bois",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=W7504.html#shwt_date=",4)
},
{
"salle" : "Cinéma du Panthéon",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0076.html#shwt_date=",4)
},
{
"salle" : "Max Linder Panorama",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0089.html#shwt_date=",4)
},
{
"salle" : "Luminor Hotel de Ville",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0013.html#shwt_date=",4)
},
{
"salle" : "Le Grand Action",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0072.html#shwt_date=",4)
},
{
"salle" : "MK2 Parnasse",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0099.html#shwt_date=",4)
},
{
"salle" : "Le Champo",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0073.html#shwt_date=",4)
},
{
"salle" : "Filmothèque du Quartier Latin",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0020.html#shwt_date=",4)
},
{
"salle" : "Reflet Medicis",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0074.html#shwt_date=",4)
},
{
"salle" : "UGC Ciné Cité Les Halles",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0159.html#shwt_date=",4)
},
{
"salle" : "UGC Ciné Cité Bercy",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0026.html#shwt_date=",4)
}
]
films = get_data(cinemas)
filmsClean = cleanFilms(films)
return render_template('jours/jour4.html', page_actuelle='jour4', films=filmsClean, date=date)
@app.route('/jour5')
@cache.cached(timeout=3600)
def jour5():
date = {
"jour1" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 0),
"chiffre" : testChiffreJour(datetime.today().day, 0),
"mois" : testMoisNumero(datetime.today().day, 0)
},
"jour2" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 1),
"chiffre" : testChiffreJour(datetime.today().day, 1),
"mois" : testMoisNumero(datetime.today().day, 1)
},
"jour3" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 2),
"chiffre" : testChiffreJour(datetime.today().day, 2),
"mois" : testMoisNumero(datetime.today().day, 2)
},
"jour4" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 3),
"chiffre" : testChiffreJour(datetime.today().day, 3),
"mois" : testMoisNumero(datetime.today().day, 3)
},
"jour5" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 4),
"chiffre" : testChiffreJour(datetime.today().day, 4),
"mois" : testMoisNumero(datetime.today().day, 4)
},
"jour6" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 5),
"chiffre" : testChiffreJour(datetime.today().day, 5),
"mois" : testMoisNumero(datetime.today().day, 5)
},
"jour7" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 6),
"chiffre" : testChiffreJour(datetime.today().day, 6),
"mois" : testMoisNumero(datetime.today().day, 6)
}
}
films = []
cinemas = [
{
"salle" : "Écoles Cinéma Club",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0071.html#shwt_date=",5)
},
{
"salle" : "MK2 Bibliothèque",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C2954.html#shwt_date=l",5)
},
{
"salle" : "MK2 Beaubourg",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0050.html#shwt_date=",5)
},
{
"salle" : "Épée de bois",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=W7504.html#shwt_date=",5)
},
{
"salle" : "Cinéma du Panthéon",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0076.html#shwt_date=",5)
},
{
"salle" : "Max Linder Panorama",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0089.html#shwt_date=",5)
},
{
"salle" : "Luminor Hotel de Ville",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0013.html#shwt_date=",5)
},
{
"salle" : "Le Grand Action",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0072.html#shwt_date=",5)
},
{
"salle" : "MK2 Parnasse",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0099.html#shwt_date=",5)
},
{
"salle" : "Le Champo",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0073.html#shwt_date=",5)
},
{
"salle" : "Filmothèque du Quartier Latin",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0020.html#shwt_date=",5)
},
{
"salle" : "Reflet Medicis",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0074.html#shwt_date=",5)
},
{
"salle" : "UGC Ciné Cité Les Halles",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0159.html#shwt_date=",5)
},
{
"salle" : "UGC Ciné Cité Bercy",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0026.html#shwt_date=",5)
}
]
films = get_data(cinemas)
filmsClean = cleanFilms(films)
return render_template('jours/jour5.html', page_actuelle='jour5', films=filmsClean, date=date)
@app.route('/jour6')
@cache.cached(timeout=3600)
def jour6():
date = {
"jour1" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 0),
"chiffre" : testChiffreJour(datetime.today().day, 0),
"mois" : testMoisNumero(datetime.today().day, 0)
},
"jour2" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 1),
"chiffre" : testChiffreJour(datetime.today().day, 1),
"mois" : testMoisNumero(datetime.today().day, 1)
},
"jour3" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 2),
"chiffre" : testChiffreJour(datetime.today().day, 2),
"mois" : testMoisNumero(datetime.today().day, 2)
},
"jour4" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 3),
"chiffre" : testChiffreJour(datetime.today().day, 3),
"mois" : testMoisNumero(datetime.today().day, 3)
},
"jour5" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 4),
"chiffre" : testChiffreJour(datetime.today().day, 4),
"mois" : testMoisNumero(datetime.today().day, 4)
},
"jour6" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 5),
"chiffre" : testChiffreJour(datetime.today().day, 5),
"mois" : testMoisNumero(datetime.today().day, 5)
},
"jour7" : {
"jour" : anglais_intoJourFrancais(datetime.today().strftime("%A"), 6),
"chiffre" : testChiffreJour(datetime.today().day, 6),
"mois" : testMoisNumero(datetime.today().day, 6)
}
}
films = []
cinemas = [
{
"salle" : "Écoles Cinéma Club",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0071.html#shwt_date=", 6)
},
{
"salle" : "MK2 Bibliothèque",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C2954.html#shwt_date=l",6)
},
{
"salle" : "MK2 Beaubourg",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0050.html#shwt_date=",6)
},
{
"salle" : "Épée de bois",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=W7504.html#shwt_date=",6)
},
{
"salle" : "Cinéma du Panthéon",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0076.html#shwt_date=",6)
},
{
"salle" : "Max Linder Panorama",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0089.html#shwt_date=",6)
},
{
"salle" : "Luminor Hotel de Ville",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0013.html#shwt_date=",6)
},
{
"salle" : "Le Grand Action",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0072.html#shwt_date=",6)
},
{
"salle" : "MK2 Parnasse",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0099.html#shwt_date=",6)
},
{
"salle" : "Le Champo",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0073.html#shwt_date=",6)
},
{
"salle" : "Filmothèque du Quartier Latin",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0020.html#shwt_date=",6)
},
{
"salle" : "Reflet Medicis",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0074.html#shwt_date=",6)
},
{
"salle" : "UGC Ciné Cité Les Halles",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0159.html#shwt_date=",6)
},
{
"salle" : "UGC Ciné Cité Bercy",
"url" : decalageDate("https://www.allocine.fr/seance/salle_gen_csalle=C0026.html#shwt_date=",6)
}
]
films = get_data(cinemas)
filmsClean = cleanFilms(films)
return render_template('jours/jour6.html', page_actuelle='jour6', films=filmsClean, date=date)
"""
@app.route('/process')
def process():
# Simule un traitement long
time.sleep(5)
return jsonify(status='success', message='Traitement terminé')
"""
if __name__ == '__main__':
app.run(debug=True)
app.run()

117
modules/Classes.py Normal file
View file

@ -0,0 +1,117 @@
from datetime import datetime
import requests
class Movie:
def __init__(self, data) -> None:
self.data = data
self.title = data["title"]
self.id = data['internalId']
self.runtime = data["runtime"]
self.synopsis = data["synopsis"]
self.genres = [genre['translate'] for genre in data["genres"]]
try:
self.affiche = data["poster"]["url"]
except:
self.affiche = "https://upload.wikimedia.org/wikipedia/commons/a/a3/Image-not-found.png" #TODO: Remplacer par une joli image qui fait 1067x1600
self.cast = []
# Noms des acteurs
for actor in data["cast"]["edges"]:
if actor["node"]["actor"] == None: continue
if actor["node"]["actor"]["lastName"] == None:
actor["node"]["actor"]["lastName"] = ""
if actor["node"]["actor"]["firstName"] == None:
actor["node"]["actor"]["firstName"] = ""
name = f'{actor["node"]["actor"]["firstName"]} {actor["node"]["actor"]["lastName"]}'
name = name.lstrip()
self.cast.append(name)
# Nom du réalisateur
if len(data["credits"]) == 0:
self.director = "Inconnu"
else:
if data["credits"][0]["person"]["lastName"] == None:
data["credits"][0]["person"]["lastName"] = ""
if data["credits"][0]["person"]["firstName"] == None:
data["credits"][0]["person"]["firstName"] = ""
self.director = f'{data["credits"][0]["person"]["firstName"]} {data["credits"][0]["person"]["lastName"]}'
self.director = self.director.lstrip()
def __repr__(self) -> str:
return f"<{self.__class__.__name__} name={self.title}>"
class Showtime:
def __init__(self, data, theather, movie:Movie) -> None:
self.startsAt = datetime.fromisoformat(data['startsAt'])
self.diffusionVersion = data['diffusionVersion']
self.services = data["service"]
self.theater:Theater = theather
self.movie = movie
def __repr__(self) -> str:
return f"<{self.__class__.__name__} name={self.movie.title} startsAt={self.startsAt}>"
class Theater:
def __init__(self, data) -> None:
self.name = data['name']
self.id = data['internalId']
self.location = data['location']
def __repr__(self) -> str:
return f"<{self.__class__.__name__} name={self.name}>"
def getShowtimes(self, date:datetime) -> list[Showtime]:
datestr = date.strftime("%Y-%m-%d")
r = requests.get(f"https://www.allocine.fr/_/showtimes/theater-{self.id}/d-{datestr}/")
if r.status_code != 200:
return {"error": True, "messag": r.status_code, "content": r.content}
try:
data = r.json()
except:
return {"error": True, "message": "Can't parse JSON", "content": r.content}
if data['error']:
return {"error": True, "message": "Error in request", "content": data}
showtimes = []
for movie in data['results']:
inst = Movie(movie["movie"])
movie_showtimes = []
movie_showtimes.extend(movie["showtimes"]["dubbed"])
movie_showtimes.extend(movie["showtimes"]["original"])
movie_showtimes.extend(movie["showtimes"]["local"])
for showtime_data in movie_showtimes:
showtimes.append(Showtime(showtime_data, self, inst))
return showtimes
@staticmethod
def new(query:str):
r = requests.get(f"https://www.allocine.fr/_/localization_city/{query}")
try:
data = r.json()
except:
return {"error": True, "message": "Can't parse JSON", "content": r.content}
if len(data["values"]["theaters"]) == 0:
return {"error": True, "message": "Not found", "content": r.content}
return Theater(data["values"]["theaters"][0]["node"])
if __name__ == "__main__":
cgr = Theater.new("CGR Brest Le Celtic")
print(f"{cgr.name} ({cgr.id})")
print(f"{cgr.location['zip']} {cgr.location['city']}")
showtimes = cgr.getShowtimes(datetime.today())
print(showtimes[0])

View file

@ -1,200 +0,0 @@
import time
from datetime import datetime
# Converti les mois en chiffre en lettres
def chiffre_intoMonth(month):
match month:
case 1:
return 'janvier'
case 2:
return 'février'
case 3:
return 'mars'
case 4:
return 'avril'
case 5:
return 'mai'
case 6:
return 'juin'
case 7:
return 'juillet'
case 8:
return 'août'
case 9:
return 'septembre'
case 10:
return 'octobre'
case 11:
return 'novembre'
case 12:
return 'décembre'
case _:
return 'invalid month'
# Calcule le décallage des jours et traduits en lettres
def anglais_intoJourFrancais(jour, decalage):
if decalage == 0:
match jour:
case "Monday":
return 'lun'
case 'Tuesday':
return 'mar'
case 'Wednesday':
return 'mer'
case 'Thursday':
return 'jeu'
case 'Friday':
return 'ven'
case 'Saturday':
return 'sam'
case 'Sunday':
return 'dim'
case _:
return 'invalid jour'
elif decalage == 1:
match jour:
case "Monday":
return 'mar'
case 'Tuesday':
return 'mer'
case 'Wednesday':
return 'jeu'
case 'Thursday':
return 'ven'
case 'Friday':
return 'sam'
case 'Saturday':
return 'dim'
case 'Sunday':
return 'lun'
case _:
return 'invalid jour'
elif decalage == 2:
match jour:
case "Monday":
return 'mer'
case 'Tuesday':
return 'jeu'
case 'Wednesday':
return 'ven'
case 'Thursday':
return 'sam'
case 'Friday':
return 'dim'
case 'Saturday':
return 'lun'
case 'Sunday':
return 'mar'
case _:
return 'invalid jour'
elif decalage == 3:
match jour:
case "Monday":
return 'jeu'
case 'Tuesday':
return 'ven'
case 'Wednesday':
return 'sam'
case 'Thursday':
return 'dim'
case 'Friday':
return 'lun'
case 'Saturday':
return 'mar'
case 'Sunday':
return 'mer'
case _:
return 'invalid jour'
elif decalage == 4:
match jour:
case "Monday":
return 'ven'
case 'Tuesday':
return 'sam'
case 'Wednesday':
return 'dim'
case 'Thursday':
return 'lun'
case 'Friday':
return 'mar'
case 'Saturday':
return 'mer'
case 'Sunday':
return 'jeu'
case _:
return 'invalid jour'
elif decalage == 5:
match jour:
case "Monday":
return 'sam'
case 'Tuesday':
return 'dim'
case 'Wednesday':
return 'lun'
case 'Thursday':
return 'mar'
case 'Friday':
return 'mer'
case 'Saturday':
return 'jeu'
case 'Sunday':
return 'ven'
case _:
return 'invalid jour'
elif decalage == 6:
match jour:
case "Monday":
return 'dim'
case 'Tuesday':
return 'lun'
case 'Wednesday':
return 'mar'
case 'Thursday':
return 'mer'
case 'Friday':
return 'jeu'
case 'Saturday':
return 'ven'
case 'Sunday':
return 'sam'
case _:
return 'invalid jour'
def testChiffreJour(chiffre, decalage):
today = datetime.today()
month = today.month
if month in [1, 3, 5, 7, 8, 10, 12]:
max_days = 31
elif month == 2:
if (today.year % 4 == 0 and today.year % 100 != 0) or (today.year % 400 == 0):
max_days = 29
else:
max_days = 28
else:
max_days = 30
if chiffre + decalage > max_days:
return chiffre + decalage - max_days
else:
return chiffre + decalage
def testMoisNumero(chiffre, decalage):
today = datetime.today()
month = today.month
if month in [1, 3, 5, 7, 8, 10, 12]:
max_days = 31
elif month == 2:
if (today.year % 4 == 0 and today.year % 100 != 0) or (today.year % 400 == 0):
max_days = 29
else:
max_days = 28
else:
max_days = 30
if chiffre + decalage > max_days:
next_month = month + 1 if month < 12 else 1
return chiffre_intoMonth(next_month)
else:
return chiffre_intoMonth(month)

View file

@ -1,73 +0,0 @@
import firebase_admin
from firebase_admin import credentials, db
import urllib.parse
cred = credentials.Certificate('static/firebase/firebase_grainParisArt.json')
firebase_admin.initialize_app(cred, {
'databaseURL': '###'
})
ref = db.reference('/')
film = {
'titre': "L'I.A. du mal",
'realisateur': 'Luca Guadagnino',
'casting': [' Zendaya', "Josh O'Connor", 'Mike Faist'],
'genres': ['Drame', 'Romance'],
'duree': {'heure': 2, 'minute': 12},
'affiche': 'https://fr.web.img2.acsta.net/c_310_420/pictures/24/01/15/10/08/2202044.jpg',
'synopsis': '\nDurant leurs études, Patrick et Art, tombent amoureux de Tashi. À la fois amis, amants et rivaux, ils voient tous les trois leurs chemins se recroiser des années plus tard. Leur passé et leur présent sentrechoquent et des tensions jusque-là inavouées refont surface.\n',
'horaires': [{'cinema': 'MK2 Parnasse', 'seances': ['20:45']}]
}
def encode_node_name(name):
replacements = {
'.': '__dot__',
'$': '__dollar__',
'#': '__hash__',
'[': '__lbrack__',
']': '__rbrack__',
'/': '__slash__'
}
for char, replacement in replacements.items():
name = name.replace(char, replacement)
return name
def enregistrementFilm(film):
cleaned_movie_name = encode_node_name(film['titre'])
movie_ref = ref.child(cleaned_movie_name)
movie_ref.set({
'titre': film['titre'],
'realisateur': film['realisateur'],
'casting': film['casting'],
'genres': film['genres'],
'duree': film['duree'],
'affiche': film['affiche'],
'synopsis': film['synopsis']
})
print(f"Node '{film['titre']}' created successfully with details!")
def recupererDataFilm(nomFilm, realisateur):
cleaned_movie_name = encode_node_name(nomFilm)
print(cleaned_movie_name)
movie_ref = ref.child(cleaned_movie_name)
# Lire les données du nœud
movie_data = movie_ref.get()
if movie_data:
# Vérifier si le réalisateur correspond
if movie_data.get('realisateur') == realisateur:
return movie_data
else:
return 0
else:
return 0
def supprimerTousLesFilms():
root_ref = ref
root_ref.delete()
print("Tous les films ont été supprimés.")

View file

@ -1,153 +0,0 @@
from bs4 import BeautifulSoup
import requests
import requests_cache
from datetime import timedelta
from modules.firebase import enregistrementFilm, recupererDataFilm
requests_cache.install_cache('film_cache', expire_after=timedelta(minutes=5))
# Récolte les données
def scrap_infoFilm(url, cinema):
films = []
response = requests.get(url)
reponse_text = response.text
soupReponse = BeautifulSoup(reponse_text, 'html.parser')
# films_list = soupReponse.find('div', class_="showtimes-list-holder").find_all('div', class_="card entity-card entity-card-list movie-card-theater cf hred")
films_list_container = soupReponse.find('div', class_="showtimes-list-holder")
if films_list_container:
films_list = films_list_container.find_all('div', class_="card entity-card entity-card-list movie-card-theater cf hred")
for film in films_list:
titre = film.find("div", class_="meta").find('h2', class_="meta-title").find("a").get_text()
realisateur_section = film.find("div", class_="meta-body-item meta-body-direction")
if realisateur_section:
realisateur = realisateur_section.find('span', class_="dark-grey-link").get_text()
else:
realisateur = "Réalisateur non trouvé"
dataFilm_firebase = recupererDataFilm(titre, realisateur)
if dataFilm_firebase == 0:
# Extraction de l'image
thumbnail_img = film.find('img', class_='thumbnail-img')
if thumbnail_img and not thumbnail_img['src'].startswith('data:image'):
img_url = thumbnail_img['src']
else:
urlAffiche = "https://www.allocine.fr" + film.find("div", class_="meta").find('h2', class_="meta-title").find("a")['href']
responseAffiche = requests.get(urlAffiche)
pageFilm = BeautifulSoup(responseAffiche.text, 'html.parser')
thumbnail_img = pageFilm.find('img', class_='thumbnail-img')
img_url = thumbnail_img['src'] if thumbnail_img and not thumbnail_img['src'].startswith('data:image') else 'Image de la vignette non trouvée'
synopsis = film.find('div', class_="synopsis").find('div', class_="content-txt").get_text() if film.find('div', class_="synopsis") else "synopsis non trouvé"
acteur_container = film.find("div", class_="meta-body-item meta-body-actor")
acteurs = [acteur.get_text() for acteur in acteur_container.find_all("span", class_="dark-grey-link")] if acteur_container else ["acteurs non trouvés"]
horaire_sections = film.find_all("div", class_="showtimes-hour-block")
horaires = [horaire_section.find('span', class_="showtimes-hour-item-value").get_text() for horaire_section in horaire_sections if horaire_section.find('span', class_="showtimes-hour-item-value")] or ["Horaire non trouvé"]
genre_container = film.find("div", class_="meta-body-item meta-body-info")
genres = [span.get_text().strip() for span in genre_container.find_all("span") if 'class' in span.attrs and not span.attrs['class'][0].startswith('spacer') and 'nationality' not in span.attrs['class']] if genre_container else ["Genre non trouvé"]
if genres: genres.pop(0)
# Récupération de la durée du film
url = "https://api.themoviedb.org/3/search/movie?query=" + titre
headers = {
"accept": "application/json",
"Authorization": "###"
}
response = requests.get(url, headers=headers)
if response.status_code == 200:
data = response.json()
if data['results']:
film_id = data['results'][0]['id']
url = "https://api.themoviedb.org/3/movie/" + str(film_id)
response = requests.get(url, headers=headers)
data = response.json()
duree_film = data['runtime']
heure = duree_film // 60
minute = duree_film % 60
else:
heure = 0
minute = 0
else:
heure = 0
minute = 0
film_data = {
"titre": titre,
"realisateur": realisateur,
"casting": acteurs,
"genres": genres,
"duree": {"heure": heure, "minute": minute},
"affiche": img_url,
"synopsis": synopsis,
"horaires": [
{
"cinema": cinema,
"seances": horaires
}
]
}
enregistrementFilm(film_data)
print(f"{film_data['titre']} : enregistré dans la db")
else:
horaire_sections = film.find_all("div", class_="showtimes-hour-block")
horaires = [horaire_section.find('span', class_="showtimes-hour-item-value").get_text() for horaire_section in horaire_sections if horaire_section.find('span', class_="showtimes-hour-item-value")] or ["Horaire non trouvé"]
film_data = {
"titre": dataFilm_firebase['titre'],
"realisateur": dataFilm_firebase['realisateur'],
"casting": dataFilm_firebase['casting'],
'genres': ['Drame', 'Romance'],
"duree": dataFilm_firebase['duree'],
"affiche": dataFilm_firebase['affiche'],
"synopsis": dataFilm_firebase['synopsis'],
"horaires": [
{
"cinema": cinema,
"seances": horaires
}
]
}
print(f"{film_data['titre']} : récupéré dans la db")
# Ajout du film s'il n'existe pas déjà
existing_film = next((f for f in films if f["titre"] == titre), None)
if existing_film:
existing_film["horaires"].append({
"cinema": cinema,
"seances": horaires
})
else:
films.append(film_data)
else:
print(f"L'élément 'showtimes-list-holder' n'a pas été trouvé pour l'URL {url}")
films_list = []
return films
def get_data(cinemas):
films = []
for cinema in cinemas:
result = scrap_infoFilm(cinema["url"], cinema["salle"])
films.extend(result)
return films
def cleanFilms(films):
filmsClean = []
for film in films:
existing_film = next((f for f in filmsClean if f["titre"] == film["titre"]), None)
if existing_film:
existing_film["horaires"].append({
"cinema": film["horaires"][0]["cinema"],
"seances": film["horaires"][0]["seances"]
})
else:
filmsClean.append(film)
return filmsClean

View file

@ -1,40 +0,0 @@
import time
from datetime import datetime
import datetime
def decalageDate(baseURL, decalage):
today = datetime.datetime.today()
day = today.day
year = today.year
month = today.month
if month in [1, 3, 5, 7, 8, 10, 12]:
max_days = 31
elif month == 2:
if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
max_days = 29
else:
max_days = 28
else:
max_days = 30
if day + decalage > max_days:
if month + 1 > 12:
year = year + 1
month = 1
day = day + decalage - max_days
url = baseURL + str(year) + "-" + str(month).zfill(2) + "-" + str(day).zfill(2)
print(url)
return url
else:
day = day + decalage - max_days
url = baseURL + str(year) + "-" + str(month).zfill(2) + "-" + str(day).zfill(2)
print(url)
return url
else:
day = day + decalage
url = baseURL + str(year) + "-" + str(month).zfill(2) + "-" + str(day).zfill(2)
print(url)
return url

Binary file not shown.

Before

Width:  |  Height:  |  Size: 691 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 708 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 974 KiB

View file

@ -7,6 +7,7 @@
<link href='https://api.mapbox.com/mapbox-gl-js/v2.8.1/mapbox-gl.css' rel='stylesheet' />
<script src='https://api.mapbox.com/mapbox-gl-js/v2.8.1/mapbox-gl.js'></script>
<link rel="shortcut icon" type="image/png" href="static/images/favicon.png"/>
<title>grainParisArt</title>
{% block head %} {% endblock %}
</head>

View file

@ -5,54 +5,14 @@
{% endblock %}
{% block body %}
<!--
<div id="loader">
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div>
-->
<a href="#headerTop">
<div class="goTop">
<p>🍿</p>
</div>
</a>
<!--
<svg class="background_svg" viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg">
<defs>
<filter id="b" x="-500" y="-500" width="2000" height="2000" filterUnits="userSpaceOnUse">
<feGaussianBlur in="SourceGraphic" stdDeviation="50" />
</filter>
<filter id="a" x="-500" y="-500" width="2000" height="2000" filterUnits="userSpaceOnUse">
<feFlood flood-color="#fff" result="neutral-gray" />
<feTurbulence type="fractalNoise" baseFrequency="2.5" numOctaves="100" stitchTiles="stitch"
result="noise" />
<feColorMatrix in="noise" type="saturate" values="0" result="destaturatedNoise" />
<feComponentTransfer in="desaturatedNoise" result="theNoise">
<feFuncA type="table" tableValues="0 0 0.1 0" />
</feComponentTransfer>
<feBlend in="SourceGraphic" in2="theNoise" mode="soft-light" result="noisy-image" />
</filter>
<radialGradient id="c" cx="50%" cy="50%" r="50%" fx="20%" fy="40%">
<stop offset="0%" stop-color="#444cf7" />
<stop offset="100%" stop-color="rgba(194,68,247,0.2)" />
</radialGradient>
</defs>
<rect width="100%" height="100%" fill="#fff" />
<g filter="url(#a)">
<g filter="url(#b)">
<svg width="800" height="800" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg"
transform="translate(140.997 117.996)">
<path fill="url(#c)"
d="M993.5 849.5Q888 1099 622 1061T226.5 811.5Q97 600 220 377t362.5-192q239.5 31 378 223t33 441.5Z" />
</svg>
</g>
</g>
</svg>
-->
<img src="../static/images/background.png" class="background_svg">
<img src="../static/images/background.svg" class="background_svg">
<div id="map"></div>
@ -62,69 +22,39 @@
<div class="contenu_edt">
<h2 class="txt_edt">Emploi du temps</h2>
<div class="calendrier">
{% for date in dates %}
{% if date.choisi %}
<div class="date-selectionne">
<p class="jour">{{date.jour1.jour}}</p>
<p class="chiffre">{{date.jour1.chiffre}}</p>
<p class="mois">{{date.jour1.mois}}</p>
<p class="jour">{{date.jour}}</p>
<p class="chiffre">{{date.chiffre}}</p>
<p class="mois">{{date.mois}}</p>
</div>
<a href="{{ url_for('jour1')}}">
{% else %}
<a href="{{ url_for('home', delta=date.index) }}">
<div class="date">
<p class="jour">{{date.jour2.jour}}</p>
<p class="chiffre">{{date.jour2.chiffre}}</p>
<p class="mois">{{date.jour2.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour2')}}">
<div class="date">
<p class="jour">{{date.jour3.jour}}</p>
<p class="chiffre">{{date.jour3.chiffre}}</p>
<p class="mois">{{date.jour3.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour3')}}">
<div class="date">
<p class="jour">{{date.jour4.jour}}</p>
<p class="chiffre">{{date.jour4.chiffre}}</p>
<p class="mois">{{date.jour4.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour4')}}">
<div class="date">
<p class="jour">{{date.jour5.jour}}</p>
<p class="chiffre">{{date.jour5.chiffre}}</p>
<p class="mois">{{date.jour5.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour5')}}">
<div class="date">
<p class="jour">{{date.jour6.jour}}</p>
<p class="chiffre">{{date.jour6.chiffre}}</p>
<p class="mois">{{date.jour6.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour6')}}">
<div class="date">
<p class="jour">{{date.jour7.jour}}</p>
<p class="chiffre">{{date.jour7.chiffre}}</p>
<p class="mois">{{date.jour7.mois}}</p>
<p class="jour">{{date.jour}}</p>
<p class="chiffre">{{date.chiffre}}</p>
<p class="mois">{{date.mois}}</p>
</div>
</a>
{% endif %}
{% endfor %}
</div>
</div>
<div class="line"></div>
</div>
{% for film in films %}
{% for film in films.values() %}
<div class="container_infoFilm">
<img src={{ film.affiche }} class="affiche" />
<div class="infoFilm">
<div class="blur-background"></div>
<div>
<h3 class="titreFilm">{{film.titre}}</h3>
<h3 class="titreFilm">{{film.title}}</h3>
<div class="info-content">
<p class="realisateur">Réalisateur : {{film.realisateur}}</p>
<p class="casting">Casting : {% for acteur in film.casting %}{{acteur}}, {% endfor %}</p>
<p class="genre">Genre : {% for genre in film.genres %}{{genre}}, {% endfor %}</p>
<p class="duree">Durée : {{film.duree.heure}}h{{film.duree.minute}}</p>
<p class="realisateur">Réalisateur : {{film.director}}</p>
<p class="casting">Casting : {{ film.casting }}</p>
<p class="genre">Genre : {{ film.genres }}</p>
<p class="duree">Durée : {{film.duree}}</p>
</div>
<div class="synopsis_container">
<p class="synopsis">
@ -136,13 +66,13 @@
</div>
<div style="height: 10px;"></div>
{% for horaire in film.horaires %}
{% for cinename, seances in film.seances.items() %}
<div class="seance_container">
<div class="cinema">
<p>{{horaire.cinema}}</p>
<p>{{cinename}}</p>
</div>
<div class="horaires_container">
{% for seance in horaire.seances %}
{% for seance in seances %}
<div class="horaire">
<p>{{seance}}</p>
</div>

View file

@ -1,199 +0,0 @@
{% extends 'base.html' %}
{% block head %}
{% endblock %}
{% block body %}
<a href="#headerTop">
<div class="goTop">
<p>🍿</p>
</div>
</a>
<!--
<svg class="background_svg" viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg">
<defs>
<filter id="b" x="-500" y="-500" width="2000" height="2000" filterUnits="userSpaceOnUse">
<feGaussianBlur in="SourceGraphic" stdDeviation="50" />
</filter>
<filter id="a" x="-500" y="-500" width="2000" height="2000" filterUnits="userSpaceOnUse">
<feFlood flood-color="#fff" result="neutral-gray" />
<feTurbulence type="fractalNoise" baseFrequency="2.5" numOctaves="100" stitchTiles="stitch"
result="noise" />
<feColorMatrix in="noise" type="saturate" values="0" result="destaturatedNoise" />
<feComponentTransfer in="desaturatedNoise" result="theNoise">
<feFuncA type="table" tableValues="0 0 0.1 0" />
</feComponentTransfer>
<feBlend in="SourceGraphic" in2="theNoise" mode="soft-light" result="noisy-image" />
</filter>
<radialGradient id="c" cx="50%" cy="50%" r="50%" fx="20%" fy="40%">
<stop offset="0%" stop-color="#444cf7" />
<stop offset="100%" stop-color="rgba(194,68,247,0.2)" />
</radialGradient>
</defs>
<rect width="100%" height="100%" fill="#fff" />
<g filter="url(#a)">
<g filter="url(#b)">
<svg width="800" height="800" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg"
transform="translate(140.997 117.996)">
<path fill="url(#c)"
d="M993.5 849.5Q888 1099 622 1061T226.5 811.5Q97 600 220 377t362.5-192q239.5 31 378 223t33 441.5Z" />
</svg>
</g>
</g>
</svg>
-->
<img src="../static/images/background.png" class="background_svg">
<div id="map"></div>
<div class="planning">
<div class="container_titrePlanning">
<div class="contenu_edt">
<h2 class="txt_edt">Emploi du temps</h2>
<div class="calendrier">
<a href="{{ url_for('home')}}">
<div class="date {% if page_actuelle == 'home' %}date-selectionne{% endif %}">
<p class="jour">{{date.jour1.jour}}</p>
<p class="chiffre">{{date.jour1.chiffre}}</p>
<p class="mois">{{date.jour1.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour1')}}">
<div class="date {% if page_actuelle == 'jour1' %}date-selectionne{% endif %}">
<p class="jour">{{date.jour2.jour}}</p>
<p class="chiffre">{{date.jour2.chiffre}}</p>
<p class="mois">{{date.jour2.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour2')}}">
<div class="date {% if page_actuelle == 'jour2' %}date-selectionne{% endif %}">
<p class="jour">{{date.jour3.jour}}</p>
<p class="chiffre">{{date.jour3.chiffre}}</p>
<p class="mois">{{date.jour3.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour3')}}">
<div class="date {% if page_actuelle == 'jour3' %}date-selectionne{% endif %}">
<p class="jour">{{date.jour4.jour}}</p>
<p class="chiffre">{{date.jour4.chiffre}}</p>
<p class="mois">{{date.jour4.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour4')}}">
<div class="date {% if page_actuelle == 'jour4' %}date-selectionne{% endif %}">
<p class="jour">{{date.jour5.jour}}</p>
<p class="chiffre">{{date.jour5.chiffre}}</p>
<p class="mois">{{date.jour5.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour5')}}">
<div class="date {% if page_actuelle == 'jour5' %}date-selectionne{% endif %}">
<p class="jour">{{date.jour6.jour}}</p>
<p class="chiffre">{{date.jour6.chiffre}}</p>
<p class="mois">{{date.jour6.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour6')}}">
<div class="date {% if page_actuelle == 'jour6' %}date-selectionne{% endif %}">
<p class="jour">{{date.jour7.jour}}</p>
<p class="chiffre">{{date.jour7.chiffre}}</p>
<p class="mois">{{date.jour7.mois}}</p>
</div>
</a>
</div>
</div>
<div class="line"></div>
</div>
{% for film in films %}
<div class="container_infoFilm">
<img src={{film.affiche}} class="affiche" />
<div class="infoFilm">
<div class="blur-background"></div>
<div>
<h3 class="titreFilm">{{film.titre}}</h3>
<div class="info-content">
<p class="realisateur">Réalisateur : {{film.realisateur}}</p>
<p class="casting">Casting : {% for acteur in film.casting %}{{acteur}}, {% endfor %}</p>
<p class="genre">Genre : {% for genre in film.genres %}{{genre}}, {% endfor %}</p>
<p class="duree">Durée : {{film.duree.heure}}h{{film.duree.minute}}</p>
</div>
<div class="synopsis_container">
<p class="synopsis">
{{film.synopsis}}
</p>
</div>
</div>
</div>
</div>
<div style="height: 10px;"></div>
{% for horaire in film.horaires %}
<div class="seance_container">
<div class="cinema">
<p>{{horaire.cinema}}</p>
</div>
<div class="horaires_container">
{% for seance in horaire.seances %}
<div class="horaire">
<p>{{seance}}</p>
</div>
{% endfor %}
</div>
</div>
<div class="responsive-petite-div"></div>
{% endfor %}
<div class="responsive-div"></div>
{% endfor %}
</div>
<script>
mapboxgl.accessToken = '###';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/streets-v11',
center: [2.3522, 48.8566],
zoom: 12
});
map.addControl(new mapboxgl.NavigationControl());
var locations = [
{ coordinates: [2.348973, 48.848363], description: "Écoles Cinéma club" },
{ coordinates: [2.546596, 48.840113], description: "UGC Ciné Cité Noisy-le-Grand" },
{ coordinates: [2.343014, 48.849777], description: "UGC Ciné Cité les Halles" },
{ coordinates: [2.342790, 48.849510], description: "Reflet Medicis" },
{ coordinates: [2.342790, 48.849510], description: "Fimothèque du quartier Latin" },
{ coordinates: [2.343223, 48.849980], description: "Le Champo" },
{ coordinates: [2.330526, 48.842813], description: "MK2 Parnasse" },
{ coordinates: [2.352129, 48.847530], description: "Le Grand Action" },
{ coordinates: [2.353602, 48.858676], description: "Luminor Hotel de Ville" },
{ coordinates: [2.344856, 48.871370], description: "Max Linder Panorama" },
{ coordinates: [2.342385, 48.847488], description: "Cinéma du Panthéon" },
{ coordinates: [2.349555, 48.841300], description: "Épée de bois" },
{ coordinates: [2.375488, 48.832448], description: "MK2 Bibliothèque" },
{ coordinates: [2.352312, 48.861584], description: "MK2 Beaubourg" }
];
locations.forEach(function (location) {
var el = document.createElement('div');
el.className = 'custom-marker';
var popup = new mapboxgl.Popup({ offset: 25 }).setText(location.description);
new mapboxgl.Marker(el)
.setLngLat(location.coordinates)
.setPopup(popup)
.addTo(map);
});
</script>
{% endblock %}

View file

@ -1,198 +0,0 @@
{% extends 'base.html' %}
{% block head %}
{% endblock %}
{% block body %}
<a href="#headerTop">
<div class="goTop">
<p>🍿</p>
</div>
</a>
<!--
<svg class="background_svg" viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg">
<defs>
<filter id="b" x="-500" y="-500" width="2000" height="2000" filterUnits="userSpaceOnUse">
<feGaussianBlur in="SourceGraphic" stdDeviation="50" />
</filter>
<filter id="a" x="-500" y="-500" width="2000" height="2000" filterUnits="userSpaceOnUse">
<feFlood flood-color="#fff" result="neutral-gray" />
<feTurbulence type="fractalNoise" baseFrequency="2.5" numOctaves="100" stitchTiles="stitch"
result="noise" />
<feColorMatrix in="noise" type="saturate" values="0" result="destaturatedNoise" />
<feComponentTransfer in="desaturatedNoise" result="theNoise">
<feFuncA type="table" tableValues="0 0 0.1 0" />
</feComponentTransfer>
<feBlend in="SourceGraphic" in2="theNoise" mode="soft-light" result="noisy-image" />
</filter>
<radialGradient id="c" cx="50%" cy="50%" r="50%" fx="20%" fy="40%">
<stop offset="0%" stop-color="#444cf7" />
<stop offset="100%" stop-color="rgba(194,68,247,0.2)" />
</radialGradient>
</defs>
<rect width="100%" height="100%" fill="#fff" />
<g filter="url(#a)">
<g filter="url(#b)">
<svg width="800" height="800" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg"
transform="translate(140.997 117.996)">
<path fill="url(#c)"
d="M993.5 849.5Q888 1099 622 1061T226.5 811.5Q97 600 220 377t362.5-192q239.5 31 378 223t33 441.5Z" />
</svg>
</g>
</g>
</svg>
-->
<img src="../static/images/background.png" class="background_svg">
<div id="map"></div>
<div class="planning">
<div class="container_titrePlanning">
<div class="contenu_edt">
<h2 class="txt_edt">Emploi du temps</h2>
<div class="calendrier">
<a href="{{ url_for('home')}}">
<div class="date">
<p class="jour">{{date.jour1.jour}}</p>
<p class="chiffre">{{date.jour1.chiffre}}</p>
<p class="mois">{{date.jour1.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour1')}}">
<div class="date">
<p class="jour">{{date.jour2.jour}}</p>
<p class="chiffre">{{date.jour2.chiffre}}</p>
<p class="mois">{{date.jour2.mois}}</p>
</div>
</a>
<a>
<div class="date-selectionne">
<p class="jour">{{date.jour3.jour}}</p>
<p class="chiffre">{{date.jour3.chiffre}}</p>
<p class="mois">{{date.jour3.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour3')}}">
<div class="date">
<p class="jour">{{date.jour4.jour}}</p>
<p class="chiffre">{{date.jour4.chiffre}}</p>
<p class="mois">{{date.jour4.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour4')}}">
<div class="date">
<p class="jour">{{date.jour5.jour}}</p>
<p class="chiffre">{{date.jour5.chiffre}}</p>
<p class="mois">{{date.jour5.mois}}</p>
</div>
</a>
<a>
<div class="date">
<p class="jour">{{date.jour6.jour}}</p>
<p class="chiffre">{{date.jour6.chiffre}}</p>
<p class="mois">{{date.jour6.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour6')}}">
<div class="date">
<p class="jour">{{date.jour7.jour}}</p>
<p class="chiffre">{{date.jour7.chiffre}}</p>
<p class="mois">{{date.jour7.mois}}</p>
</div>
</a>
</div>
</div>
<div class="line"></div>
</div>
{% for film in films %}
<div class="container_infoFilm">
<img src={{film.affiche}} class="affiche" />
<div class="infoFilm">
<div class="blur-background"></div>
<div>
<h3 class="titreFilm">{{film.titre}}</h3>
<div class="info-content">
<p class="realisateur">Réalisateur : {{film.realisateur}}</p>
<p class="casting">Casting : {% for acteur in film.casting %}{{acteur}}, {% endfor %}</p>
<p class="genre">Genre : {% for genre in film.genres %}{{genre}}, {% endfor %}</p>
<p class="duree">Durée : {{film.duree.heure}}h{{film.duree.minute}}</p>
</div>
<div class="synopsis_container">
<p class="synopsis">
{{film.synopsis}}
</p>
</div>
</div>
</div>
</div>
<div style="height: 10px;"></div>
{% for horaire in film.horaires %}
<div class="seance_container">
<div class="cinema">
<p>{{horaire.cinema}}</p>
</div>
<div class="horaires_container">
{% for seance in horaire.seances %}
<div class="horaire">
<p>{{seance}}</p>
</div>
{% endfor %}
</div>
</div>
<div class="responsive-petite-div"></div>
{% endfor %}
<div class="responsive-div"></div>
{% endfor %}
</div>
<script>
mapboxgl.accessToken = '###';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/streets-v11',
center: [2.3522, 48.8566],
zoom: 12
});
map.addControl(new mapboxgl.NavigationControl());
var locations = [
{ coordinates: [2.348973, 48.848363], description: "Écoles Cinéma club" },
{ coordinates: [2.546596, 48.840113], description: "UGC Ciné Cité Noisy-le-Grand" },
{ coordinates: [2.343014, 48.849777], description: "UGC Ciné Cité les Halles" },
{ coordinates: [2.342790, 48.849510], description: "Reflet Medicis" },
{ coordinates: [2.342790, 48.849510], description: "Fimothèque du quartier Latin" },
{ coordinates: [2.343223, 48.849980], description: "Le Champo" },
{ coordinates: [2.330526, 48.842813], description: "MK2 Parnasse" },
{ coordinates: [2.352129, 48.847530], description: "Le Grand Action" },
{ coordinates: [2.353602, 48.858676], description: "Luminor Hotel de Ville" },
{ coordinates: [2.344856, 48.871370], description: "Max Linder Panorama" },
{ coordinates: [2.342385, 48.847488], description: "Cinéma du Panthéon" },
{ coordinates: [2.349555, 48.841300], description: "Épée de bois" },
{ coordinates: [2.375488, 48.832448], description: "MK2 Bibliothèque" },
{ coordinates: [2.352312, 48.861584], description: "MK2 Beaubourg" }
];
locations.forEach(function (location) {
var el = document.createElement('div');
el.className = 'custom-marker';
var popup = new mapboxgl.Popup({ offset: 25 }).setText(location.description);
new mapboxgl.Marker(el)
.setLngLat(location.coordinates)
.setPopup(popup)
.addTo(map);
});
</script>
{% endblock %}

View file

@ -1,196 +0,0 @@
{% extends 'base.html' %}
{% block head %}
{% endblock %}
{% block body %}
<a href="#headerTop">
<div class="goTop">
<p>🍿</p>
</div>
</a>
<!--
<svg class="background_svg" viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg">
<defs>
<filter id="b" x="-500" y="-500" width="2000" height="2000" filterUnits="userSpaceOnUse">
<feGaussianBlur in="SourceGraphic" stdDeviation="50" />
</filter>
<filter id="a" x="-500" y="-500" width="2000" height="2000" filterUnits="userSpaceOnUse">
<feFlood flood-color="#fff" result="neutral-gray" />
<feTurbulence type="fractalNoise" baseFrequency="2.5" numOctaves="100" stitchTiles="stitch"
result="noise" />
<feColorMatrix in="noise" type="saturate" values="0" result="destaturatedNoise" />
<feComponentTransfer in="desaturatedNoise" result="theNoise">
<feFuncA type="table" tableValues="0 0 0.1 0" />
</feComponentTransfer>
<feBlend in="SourceGraphic" in2="theNoise" mode="soft-light" result="noisy-image" />
</filter>
<radialGradient id="c" cx="50%" cy="50%" r="50%" fx="20%" fy="40%">
<stop offset="0%" stop-color="#444cf7" />
<stop offset="100%" stop-color="rgba(194,68,247,0.2)" />
</radialGradient>
</defs>
<rect width="100%" height="100%" fill="#fff" />
<g filter="url(#a)">
<g filter="url(#b)">
<svg width="800" height="800" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg"
transform="translate(140.997 117.996)">
<path fill="url(#c)"
d="M993.5 849.5Q888 1099 622 1061T226.5 811.5Q97 600 220 377t362.5-192q239.5 31 378 223t33 441.5Z" />
</svg>
</g>
</g>
</svg>
-->
<img src="../static/images/background.png" class="background_svg">
<div id="map"></div>
<div class="planning">
<div class="container_titrePlanning">
<div class="contenu_edt">
<h2 class="txt_edt">Emploi du temps</h2>
<div class="calendrier">
<a href="{{ url_for('home')}}">
<div class="date">
<p class="jour">{{date.jour1.jour}}</p>
<p class="chiffre">{{date.jour1.chiffre}}</p>
<p class="mois">{{date.jour1.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour1')}}">
<div class="date">
<p class="jour">{{date.jour2.jour}}</p>
<p class="chiffre">{{date.jour2.chiffre}}</p>
<p class="mois">{{date.jour2.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour2')}}">
<div class="date">
<p class="jour">{{date.jour3.jour}}</p>
<p class="chiffre">{{date.jour3.chiffre}}</p>
<p class="mois">{{date.jour3.mois}}</p>
</div>
</a>
<a>
<div class="date-selectionne">
<p class="jour">{{date.jour4.jour}}</p>
<p class="chiffre">{{date.jour4.chiffre}}</p>
<p class="mois">{{date.jour4.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour4')}}">
<div class="date">
<p class="jour">{{date.jour5.jour}}</p>
<p class="chiffre">{{date.jour5.chiffre}}</p>
<p class="mois">{{date.jour5.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour5')}}">
<div class="date">
<p class="jour">{{date.jour6.jour}}</p>
<p class="chiffre">{{date.jour6.chiffre}}</p>
<p class="mois">{{date.jour6.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour6')}}">
<div class="date">
<p class="jour">{{date.jour7.jour}}</p>
<p class="chiffre">{{date.jour7.chiffre}}</p>
<p class="mois">{{date.jour7.mois}}</p>
</div>
</a>
</div>
</div>
<div class="line"></div>
</div>
{% for film in films %}
<div class="container_infoFilm">
<img src={{film.affiche}} class="affiche" />
<div class="infoFilm">
<div class="blur-background"></div>
<div>
<h3 class="titreFilm">{{film.titre}}</h3>
<div class="info-content">
<p class="realisateur">Réalisateur : {{film.realisateur}}</p>
<p class="casting">Casting : {% for acteur in film.casting %}{{acteur}}, {% endfor %}</p>
<p class="genre">Genre : {% for genre in film.genres %}{{genre}}, {% endfor %}</p>
<p class="duree">Durée : {{film.duree.heure}}h{{film.duree.minute}}</p>
</div>
<div class="synopsis_container">
<p class="synopsis">
{{film.synopsis}}
</p>
</div>
</div>
</div>
</div>
<div style="height: 10px;"></div>
{% for horaire in film.horaires %}
<div class="seance_container">
<div class="cinema">
<p>{{horaire.cinema}}</p>
</div>
<div class="horaires_container">
{% for seance in horaire.seances %}
<div class="horaire">
<p>{{seance}}</p>
</div>
{% endfor %}
</div>
</div>
<div class="responsive-petite-div"></div>
{% endfor %}
<div class="responsive-div"></div>
{% endfor %}
</div>
<script>
mapboxgl.accessToken = '###';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/streets-v11',
center: [2.3522, 48.8566],
zoom: 12
});
map.addControl(new mapboxgl.NavigationControl());
var locations = [
{ coordinates: [2.348973, 48.848363], description: "Écoles Cinéma club" },
{ coordinates: [2.546596, 48.840113], description: "UGC Ciné Cité Noisy-le-Grand" },
{ coordinates: [2.343014, 48.849777], description: "UGC Ciné Cité les Halles" },
{ coordinates: [2.342790, 48.849510], description: "Reflet Medicis" },
{ coordinates: [2.342790, 48.849510], description: "Fimothèque du quartier Latin" },
{ coordinates: [2.343223, 48.849980], description: "Le Champo" },
{ coordinates: [2.330526, 48.842813], description: "MK2 Parnasse" },
{ coordinates: [2.352129, 48.847530], description: "Le Grand Action" },
{ coordinates: [2.353602, 48.858676], description: "Luminor Hotel de Ville" },
{ coordinates: [2.344856, 48.871370], description: "Max Linder Panorama" },
{ coordinates: [2.342385, 48.847488], description: "Cinéma du Panthéon" },
{ coordinates: [2.349555, 48.841300], description: "Épée de bois" },
{ coordinates: [2.375488, 48.832448], description: "MK2 Bibliothèque" },
{ coordinates: [2.352312, 48.861584], description: "MK2 Beaubourg" }
];
locations.forEach(function (location) {
var el = document.createElement('div');
el.className = 'custom-marker';
var popup = new mapboxgl.Popup({ offset: 25 }).setText(location.description);
new mapboxgl.Marker(el)
.setLngLat(location.coordinates)
.setPopup(popup)
.addTo(map);
});
</script>
{% endblock %}

View file

@ -1,196 +0,0 @@
{% extends 'base.html' %}
{% block head %}
{% endblock %}
{% block body %}
<a href="#headerTop">
<div class="goTop">
<p>🍿</p>
</div>
</a>
<!--
<svg class="background_svg" viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg">
<defs>
<filter id="b" x="-500" y="-500" width="2000" height="2000" filterUnits="userSpaceOnUse">
<feGaussianBlur in="SourceGraphic" stdDeviation="50" />
</filter>
<filter id="a" x="-500" y="-500" width="2000" height="2000" filterUnits="userSpaceOnUse">
<feFlood flood-color="#fff" result="neutral-gray" />
<feTurbulence type="fractalNoise" baseFrequency="2.5" numOctaves="100" stitchTiles="stitch"
result="noise" />
<feColorMatrix in="noise" type="saturate" values="0" result="destaturatedNoise" />
<feComponentTransfer in="desaturatedNoise" result="theNoise">
<feFuncA type="table" tableValues="0 0 0.1 0" />
</feComponentTransfer>
<feBlend in="SourceGraphic" in2="theNoise" mode="soft-light" result="noisy-image" />
</filter>
<radialGradient id="c" cx="50%" cy="50%" r="50%" fx="20%" fy="40%">
<stop offset="0%" stop-color="#444cf7" />
<stop offset="100%" stop-color="rgba(194,68,247,0.2)" />
</radialGradient>
</defs>
<rect width="100%" height="100%" fill="#fff" />
<g filter="url(#a)">
<g filter="url(#b)">
<svg width="800" height="800" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg"
transform="translate(140.997 117.996)">
<path fill="url(#c)"
d="M993.5 849.5Q888 1099 622 1061T226.5 811.5Q97 600 220 377t362.5-192q239.5 31 378 223t33 441.5Z" />
</svg>
</g>
</g>
</svg>
-->
<img src="../static/images/background.png" class="background_svg">
<div id="map"></div>
<div class="planning">
<div class="container_titrePlanning">
<div class="contenu_edt">
<h2 class="txt_edt">Emploi du temps</h2>
<div class="calendrier">
<a href="{{ url_for('home')}}">
<div class="date">
<p class="jour">{{date.jour1.jour}}</p>
<p class="chiffre">{{date.jour1.chiffre}}</p>
<p class="mois">{{date.jour1.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour1')}}">
<div class="date">
<p class="jour">{{date.jour2.jour}}</p>
<p class="chiffre">{{date.jour2.chiffre}}</p>
<p class="mois">{{date.jour2.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour2')}}">
<div class="date">
<p class="jour">{{date.jour3.jour}}</p>
<p class="chiffre">{{date.jour3.chiffre}}</p>
<p class="mois">{{date.jour3.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour2')}}">
<div class="date">
<p class="jour">{{date.jour4.jour}}</p>
<p class="chiffre">{{date.jour4.chiffre}}</p>
<p class="mois">{{date.jour4.mois}}</p>
</div>
</a>
<a>
<div class="date-selectionne">
<p class="jour">{{date.jour5.jour}}</p>
<p class="chiffre">{{date.jour5.chiffre}}</p>
<p class="mois">{{date.jour5.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour5')}}">
<div class="date">
<p class="jour">{{date.jour6.jour}}</p>
<p class="chiffre">{{date.jour6.chiffre}}</p>
<p class="mois">{{date.jour6.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour6')}}">
<div class="date">
<p class="jour">{{date.jour7.jour}}</p>
<p class="chiffre">{{date.jour7.chiffre}}</p>
<p class="mois">{{date.jour7.mois}}</p>
</div>
</a>
</div>
</div>
<div class="line"></div>
</div>
{% for film in films %}
<div class="container_infoFilm">
<img src={{film.affiche}} class="affiche" />
<div class="infoFilm">
<div class="blur-background"></div>
<div>
<h3 class="titreFilm">{{film.titre}}</h3>
<div class="info-content">
<p class="realisateur">Réalisateur : {{film.realisateur}}</p>
<p class="casting">Casting : {% for acteur in film.casting %}{{acteur}}, {% endfor %}</p>
<p class="genre">Genre : {% for genre in film.genres %}{{genre}}, {% endfor %}</p>
<p class="duree">Durée : {{film.duree.heure}}h{{film.duree.minute}}</p>
</div>
<div class="synopsis_container">
<p class="synopsis">
{{film.synopsis}}
</p>
</div>
</div>
</div>
</div>
<div style="height: 10px;"></div>
{% for horaire in film.horaires %}
<div class="seance_container">
<div class="cinema">
<p>{{horaire.cinema}}</p>
</div>
<div class="horaires_container">
{% for seance in horaire.seances %}
<div class="horaire">
<p>{{seance}}</p>
</div>
{% endfor %}
</div>
</div>
<div class="responsive-petite-div"></div>
{% endfor %}
<div class="responsive-div"></div>
{% endfor %}
</div>
<script>
mapboxgl.accessToken = '###';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/streets-v11',
center: [2.3522, 48.8566],
zoom: 12
});
map.addControl(new mapboxgl.NavigationControl());
var locations = [
{ coordinates: [2.348973, 48.848363], description: "Écoles Cinéma club" },
{ coordinates: [2.546596, 48.840113], description: "UGC Ciné Cité Noisy-le-Grand" },
{ coordinates: [2.343014, 48.849777], description: "UGC Ciné Cité les Halles" },
{ coordinates: [2.342790, 48.849510], description: "Reflet Medicis" },
{ coordinates: [2.342790, 48.849510], description: "Fimothèque du quartier Latin" },
{ coordinates: [2.343223, 48.849980], description: "Le Champo" },
{ coordinates: [2.330526, 48.842813], description: "MK2 Parnasse" },
{ coordinates: [2.352129, 48.847530], description: "Le Grand Action" },
{ coordinates: [2.353602, 48.858676], description: "Luminor Hotel de Ville" },
{ coordinates: [2.344856, 48.871370], description: "Max Linder Panorama" },
{ coordinates: [2.342385, 48.847488], description: "Cinéma du Panthéon" },
{ coordinates: [2.349555, 48.841300], description: "Épée de bois" },
{ coordinates: [2.375488, 48.832448], description: "MK2 Bibliothèque" },
{ coordinates: [2.352312, 48.861584], description: "MK2 Beaubourg" }
];
locations.forEach(function (location) {
var el = document.createElement('div');
el.className = 'custom-marker';
var popup = new mapboxgl.Popup({ offset: 25 }).setText(location.description);
new mapboxgl.Marker(el)
.setLngLat(location.coordinates)
.setPopup(popup)
.addTo(map);
});
</script>
{% endblock %}

View file

@ -1,197 +0,0 @@
{% extends 'base.html' %}
{% block head %}
{% endblock %}
{% block body %}
<a href="#headerTop">
<div class="goTop">
<p>🍿</p>
</div>
</a>
<!--
<svg class="background_svg" viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg">
<defs>
<filter id="b" x="-500" y="-500" width="2000" height="2000" filterUnits="userSpaceOnUse">
<feGaussianBlur in="SourceGraphic" stdDeviation="50" />
</filter>
<filter id="a" x="-500" y="-500" width="2000" height="2000" filterUnits="userSpaceOnUse">
<feFlood flood-color="#fff" result="neutral-gray" />
<feTurbulence type="fractalNoise" baseFrequency="2.5" numOctaves="100" stitchTiles="stitch"
result="noise" />
<feColorMatrix in="noise" type="saturate" values="0" result="destaturatedNoise" />
<feComponentTransfer in="desaturatedNoise" result="theNoise">
<feFuncA type="table" tableValues="0 0 0.1 0" />
</feComponentTransfer>
<feBlend in="SourceGraphic" in2="theNoise" mode="soft-light" result="noisy-image" />
</filter>
<radialGradient id="c" cx="50%" cy="50%" r="50%" fx="20%" fy="40%">
<stop offset="0%" stop-color="#444cf7" />
<stop offset="100%" stop-color="rgba(194,68,247,0.2)" />
</radialGradient>
</defs>
<rect width="100%" height="100%" fill="#fff" />
<g filter="url(#a)">
<g filter="url(#b)">
<svg width="800" height="800" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg"
transform="translate(140.997 117.996)">
<path fill="url(#c)"
d="M993.5 849.5Q888 1099 622 1061T226.5 811.5Q97 600 220 377t362.5-192q239.5 31 378 223t33 441.5Z" />
</svg>
</g>
</g>
</svg>
-->
<img src="../static/images/background.png" class="background_svg">
<div id="map"></div>
<div class="planning">
<div class="container_titrePlanning">
<div class="contenu_edt">
<h2 class="txt_edt">Emploi du temps</h2>
<div class="calendrier">
<a href="{{ url_for('home')}}">
<div class="date">
<p class="jour">{{date.jour1.jour}}</p>
<p class="chiffre">{{date.jour1.chiffre}}</p>
<p class="mois">{{date.jour1.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour1')}}">
<div class="date">
<p class="jour">{{date.jour2.jour}}</p>
<p class="chiffre">{{date.jour2.chiffre}}</p>
<p class="mois">{{date.jour2.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour2')}}">
<div class="date">
<p class="jour">{{date.jour3.jour}}</p>
<p class="chiffre">{{date.jour3.chiffre}}</p>
<p class="mois">{{date.jour3.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour3')}}">
<div class="date">
<p class="jour">{{date.jour4.jour}}</p>
<p class="chiffre">{{date.jour4.chiffre}}</p>
<p class="mois">{{date.jour4.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour4')}}">
<div class="date">
<p class="jour">{{date.jour5.jour}}</p>
<p class="chiffre">{{date.jour5.chiffre}}</p>
<p class="mois">{{date.jour5.mois}}</p>
</div>
</a>
<a>
<div class="date-selectionne">
<p class="jour">{{date.jour6.jour}}</p>
<p class="chiffre">{{date.jour6.chiffre}}</p>
<p class="mois">{{date.jour6.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour6')}}">
<div class="date">
<p class="jour">{{date.jour7.jour}}</p>
<p class="chiffre">{{date.jour7.chiffre}}</p>
<p class="mois">{{date.jour7.mois}}</p>
</div>
</a>
</div>
</div>
<div class="line"></div>
</div>
{% for film in films %}
<div class="container_infoFilm">
<img src={{film.affiche}} class="affiche" />
<div class="infoFilm">
<div class="blur-background"></div>
<div>
<h3 class="titreFilm">{{film.titre}}</h3>
<div class="info-content">
<p class="realisateur">Réalisateur : {{film.realisateur}}</p>
<p class="casting">Casting : {% for acteur in film.casting %}{{acteur}}, {% endfor %}</p>
<p class="genre">Genre : {% for genre in film.genres %}{{genre}}, {% endfor %}</p>
<p class="duree">Durée : {{film.duree.heure}}h{{film.duree.minute}}</p>
</div>
<div class="synopsis_container">
<p class="synopsis">
{{film.synopsis}}
</p>
</div>
</div>
</div>
</div>
<div style="height: 10px;"></div>
{% for horaire in film.horaires %}
<div class="seance_container">
<div class="cinema">
<p>{{horaire.cinema}}</p>
</div>
<div class="horaires_container">
{% for seance in horaire.seances %}
<div class="horaire">
<p>{{seance}}</p>
</div>
{% endfor %}
</div>
</div>
<div class="responsive-petite-div"></div>
{% endfor %}
<div class="responsive-div"></div>
{% endfor %}
</div>
<script>
mapboxgl.accessToken = '###';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/streets-v11',
center: [2.3522, 48.8566],
zoom: 12
});
map.addControl(new mapboxgl.NavigationControl());
var locations = [
{ coordinates: [2.348973, 48.848363], description: "Écoles Cinéma club" },
{ coordinates: [2.546596, 48.840113], description: "UGC Ciné Cité Noisy-le-Grand" },
{ coordinates: [2.343014, 48.849777], description: "UGC Ciné Cité les Halles" },
{ coordinates: [2.342790, 48.849510], description: "Reflet Medicis" },
{ coordinates: [2.342790, 48.849510], description: "Fimothèque du quartier Latin" },
{ coordinates: [2.343223, 48.849980], description: "Le Champo" },
{ coordinates: [2.330526, 48.842813], description: "MK2 Parnasse" },
{ coordinates: [2.352129, 48.847530], description: "Le Grand Action" },
{ coordinates: [2.353602, 48.858676], description: "Luminor Hotel de Ville" },
{ coordinates: [2.344856, 48.871370], description: "Max Linder Panorama" },
{ coordinates: [2.342385, 48.847488], description: "Cinéma du Panthéon" },
{ coordinates: [2.349555, 48.841300], description: "Épée de bois" },
{ coordinates: [2.375488, 48.832448], description: "MK2 Bibliothèque" },
{ coordinates: [2.352312, 48.861584], description: "MK2 Beaubourg" }
];
locations.forEach(function (location) {
var el = document.createElement('div');
el.className = 'custom-marker';
var popup = new mapboxgl.Popup({ offset: 25 }).setText(location.description);
new mapboxgl.Marker(el)
.setLngLat(location.coordinates)
.setPopup(popup)
.addTo(map);
});
</script>
{% endblock %}

View file

@ -1,197 +0,0 @@
{% extends 'base.html' %}
{% block head %}
{% endblock %}
{% block body %}
<a href="#headerTop">
<div class="goTop">
<p>🍿</p>
</div>
</a>
<!--
<svg class="background_svg" viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg">
<defs>
<filter id="b" x="-500" y="-500" width="2000" height="2000" filterUnits="userSpaceOnUse">
<feGaussianBlur in="SourceGraphic" stdDeviation="50" />
</filter>
<filter id="a" x="-500" y="-500" width="2000" height="2000" filterUnits="userSpaceOnUse">
<feFlood flood-color="#fff" result="neutral-gray" />
<feTurbulence type="fractalNoise" baseFrequency="2.5" numOctaves="100" stitchTiles="stitch"
result="noise" />
<feColorMatrix in="noise" type="saturate" values="0" result="destaturatedNoise" />
<feComponentTransfer in="desaturatedNoise" result="theNoise">
<feFuncA type="table" tableValues="0 0 0.1 0" />
</feComponentTransfer>
<feBlend in="SourceGraphic" in2="theNoise" mode="soft-light" result="noisy-image" />
</filter>
<radialGradient id="c" cx="50%" cy="50%" r="50%" fx="20%" fy="40%">
<stop offset="0%" stop-color="#444cf7" />
<stop offset="100%" stop-color="rgba(194,68,247,0.2)" />
</radialGradient>
</defs>
<rect width="100%" height="100%" fill="#fff" />
<g filter="url(#a)">
<g filter="url(#b)">
<svg width="800" height="800" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg"
transform="translate(140.997 117.996)">
<path fill="url(#c)"
d="M993.5 849.5Q888 1099 622 1061T226.5 811.5Q97 600 220 377t362.5-192q239.5 31 378 223t33 441.5Z" />
</svg>
</g>
</g>
</svg>
-->
<img src="../static/images/background.png" class="background_svg">
<div id="map"></div>
<div class="planning">
<div class="container_titrePlanning">
<div class="contenu_edt">
<h2 class="txt_edt">Emploi du temps</h2>
<div class="calendrier">
<a href="{{ url_for('home')}}">
<div class="date">
<p class="jour">{{date.jour1.jour}}</p>
<p class="chiffre">{{date.jour1.chiffre}}</p>
<p class="mois">{{date.jour1.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour1')}}">
<div class="date">
<p class="jour">{{date.jour2.jour}}</p>
<p class="chiffre">{{date.jour2.chiffre}}</p>
<p class="mois">{{date.jour2.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour2')}}">
<div class="date">
<p class="jour">{{date.jour3.jour}}</p>
<p class="chiffre">{{date.jour3.chiffre}}</p>
<p class="mois">{{date.jour3.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour3')}}">
<div class="date">
<p class="jour">{{date.jour4.jour}}</p>
<p class="chiffre">{{date.jour4.chiffre}}</p>
<p class="mois">{{date.jour4.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour4')}}">
<div class="date">
<p class="jour">{{date.jour5.jour}}</p>
<p class="chiffre">{{date.jour5.chiffre}}</p>
<p class="mois">{{date.jour5.mois}}</p>
</div>
</a>
<a href="{{ url_for('jour5')}}">
<div class="date">
<p class="jour">{{date.jour6.jour}}</p>
<p class="chiffre">{{date.jour6.chiffre}}</p>
<p class="mois">{{date.jour6.mois}}</p>
</div>
</a>
<a>
<div class="date-selectionne">
<p class="jour">{{date.jour7.jour}}</p>
<p class="chiffre">{{date.jour7.chiffre}}</p>
<p class="mois">{{date.jour7.mois}}</p>
</div>
</a>
</div>
</div>
<div class="line"></div>
</div>
{% for film in films %}
<div class="container_infoFilm">
<img src={{film.affiche}} class="affiche" />
<div class="infoFilm">
<div class="blur-background"></div>
<div>
<h3 class="titreFilm">{{film.titre}}</h3>
<div class="info-content">
<p class="realisateur">Réalisateur : {{film.realisateur}}</p>
<p class="casting">Casting : {% for acteur in film.casting %}{{acteur}}, {% endfor %}</p>
<p class="genre">Genre : {% for genre in film.genres %}{{genre}}, {% endfor %}</p>
<p class="duree">Durée : {{film.duree.heure}}h{{film.duree.minute}}</p>
</div>
<div class="synopsis_container">
<p class="synopsis">
{{film.synopsis}}
</p>
</div>
</div>
</div>
</div>
<div style="height: 10px;"></div>
{% for horaire in film.horaires %}
<div class="seance_container">
<div class="cinema">
<p>{{horaire.cinema}}</p>
</div>
<div class="horaires_container">
{% for seance in horaire.seances %}
<div class="horaire">
<p>{{seance}}</p>
</div>
{% endfor %}
</div>
</div>
<div class="responsive-petite-div"></div>
{% endfor %}
<div class="responsive-div"></div>
{% endfor %}
</div>
<script>
mapboxgl.accessToken = '###';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/streets-v11',
center: [2.3522, 48.8566],
zoom: 12
});
map.addControl(new mapboxgl.NavigationControl());
var locations = [
{ coordinates: [2.348973, 48.848363], description: "Écoles Cinéma club" },
{ coordinates: [2.546596, 48.840113], description: "UGC Ciné Cité Noisy-le-Grand" },
{ coordinates: [2.343014, 48.849777], description: "UGC Ciné Cité les Halles" },
{ coordinates: [2.342790, 48.849510], description: "Reflet Medicis" },
{ coordinates: [2.342790, 48.849510], description: "Fimothèque du quartier Latin" },
{ coordinates: [2.343223, 48.849980], description: "Le Champo" },
{ coordinates: [2.330526, 48.842813], description: "MK2 Parnasse" },
{ coordinates: [2.352129, 48.847530], description: "Le Grand Action" },
{ coordinates: [2.353602, 48.858676], description: "Luminor Hotel de Ville" },
{ coordinates: [2.344856, 48.871370], description: "Max Linder Panorama" },
{ coordinates: [2.342385, 48.847488], description: "Cinéma du Panthéon" },
{ coordinates: [2.349555, 48.841300], description: "Épée de bois" },
{ coordinates: [2.375488, 48.832448], description: "MK2 Bibliothèque" },
{ coordinates: [2.352312, 48.861584], description: "MK2 Beaubourg" }
];
locations.forEach(function (location) {
var el = document.createElement('div');
el.className = 'custom-marker';
var popup = new mapboxgl.Popup({ offset: 25 }).setText(location.description);
new mapboxgl.Marker(el)
.setLngLat(location.coordinates)
.setPopup(popup)
.addTo(map);
});
</script>
{% endblock %}

1773
tmp.json Normal file

File diff suppressed because it is too large Load diff