From a9a68e7df32340daf8b960a008cd881f6a18a8b5 Mon Sep 17 00:00:00 2001 From: Jesus E Date: Sun, 28 May 2023 20:42:00 -0400 Subject: go ti video with url --- youtube/search.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'youtube') diff --git a/youtube/search.py b/youtube/search.py index 7057747..d888c6c 100644 --- a/youtube/search.py +++ b/youtube/search.py @@ -64,6 +64,8 @@ def get_search_page(): query = request.args.get('search_query') or request.args.get('query') if query is None: return flask.render_template('home.html', title='Search') + elif query.startswith("https"): + return flask.redirect(f"/{query}") page = request.args.get("page", "1") autocorrect = int(request.args.get("autocorrect", "1")) -- cgit v1.2.3