From 1b8376bbcaca9e55af799837f93ff0b9a8efa775 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 20 Apr 2021 20:49:58 +0100 Subject: [PATCH] python backend slightly working --- main.py | 12 +++++++++++- static/index.css | 2 +- templates/index.html | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 78ea441..0cacc88 100644 --- a/main.py +++ b/main.py @@ -23,7 +23,17 @@ def dated_url_for(endpoint, **values): @app.route("/", methods=["POST", "GET"]) def home(): if request.method == "POST": - pass + url = request.form["ur"] + downloader.set_url(url) + videos = downloader.get_videos() + audios = downloader.get_audios() + audiovideos = downloader.get_audio_videos() + + print(videos) + print(audios) + print(audiovideos) + + return render_template("index.html") else: return render_template("index.html") diff --git a/static/index.css b/static/index.css index 1f7ee40..54a0265 100644 --- a/static/index.css +++ b/static/index.css @@ -55,5 +55,5 @@ } .center-container form button:hover { - color: var(--main-text-color) + color: var(--main-text-color); } diff --git a/templates/index.html b/templates/index.html index 5b54c5d..5784147 100644 --- a/templates/index.html +++ b/templates/index.html @@ -8,7 +8,7 @@

YT Buddy

Convert and download YouTube video and audio online, for free.

- +