From beca545951f600e319ce5475d92c15c94c09c8d8 Mon Sep 17 00:00:00 2001 From: Jesus E Date: Sun, 28 May 2023 20:42:47 -0400 Subject: GO to cideo with url --- youtube/search.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'youtube/search.py') diff --git a/youtube/search.py b/youtube/search.py index d888c6c..d586c62 100644 --- a/youtube/search.py +++ b/youtube/search.py @@ -64,8 +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}") + elif query.startswith('https://www.youtube.com') or query.startswith('https://www.youtu.be'): + return flask.redirect(f'/{query}') page = request.args.get("page", "1") autocorrect = int(request.args.get("autocorrect", "1")) -- cgit v1.2.3