From eec6f31419f2c501cee51cbb723a16825e5be282 Mon Sep 17 00:00:00 2001 From: Rsclub2 2 Date: Wed, 18 Oct 2023 15:04:53 +0200 Subject: [PATCH] Clean Up and fixing docker build --- Dockerfile | 2 +- Hafas_Main_web.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4e243ba..ff3e29a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,6 @@ WORKDIR /hafas_db COPY Hafas_Main_web.py app.py RUN mkdir -p templates COPY templates templates/. -RUN pip3 install Flask +RUN pip3 install Flask requests CMD ["python3", "app.py"] EXPOSE 5000 diff --git a/Hafas_Main_web.py b/Hafas_Main_web.py index c11eb52..6e13433 100644 --- a/Hafas_Main_web.py +++ b/Hafas_Main_web.py @@ -11,7 +11,6 @@ def index(): if request.method == 'POST': station_name = request.form.get('station_name', '') if station_name: - # Speichere den Stationsnamen im Cookie url = f"https://dbf.finalrewind.org/{station_name}.json?version=3" response = requests.get(url) @@ -22,7 +21,7 @@ def index(): resp.set_cookie('station_name', station_name) return resp - if station_name: # Überprüfe, ob ein Stationsname aus dem Cookie gelesen wurde + if station_name: url = f"https://dbf.finalrewind.org/{station_name}.json?version=3" response = requests.get(url)