Skip to content

Commit

Permalink
python backend slightly working
Browse files Browse the repository at this point in the history
  • Loading branch information
sdfiokpskiopdf committed Apr 20, 2021
1 parent 537bb10 commit 1b8376b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
12 changes: 11 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion static/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@
}

.center-container form button:hover {
color: var(--main-text-color)
color: var(--main-text-color);
}
2 changes: 1 addition & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<h1 class="title">YT Buddy</h1>
<p class="subtitle">Convert and download YouTube video and audio online, for <b>free</b>.</p>
<form class="form" action="#" method="POST">
<input type="search" placeholder="paste youtube link here" required>
<input type="search" placeholder="Paste youtube link here" name="ur" required>
<button type="submit">Convert</button>
</form>
</div>
Expand Down

0 comments on commit 1b8376b

Please sign in to comment.