diff options
author | Jesus E <heckyel@riseup.net> | 2023-05-28 20:42:47 -0400 |
---|---|---|
committer | Jesus E <heckyel@riseup.net> | 2023-05-28 20:42:47 -0400 |
commit | beca545951f600e319ce5475d92c15c94c09c8d8 (patch) | |
tree | 11d56f2afb2dc88f8db2d8cf05a61e6dbb295927 | |
parent | a9a68e7df32340daf8b960a008cd881f6a18a8b5 (diff) | |
download | yt-local-beca545951f600e319ce5475d92c15c94c09c8d8.tar.lz yt-local-beca545951f600e319ce5475d92c15c94c09c8d8.tar.xz yt-local-beca545951f600e319ce5475d92c15c94c09c8d8.zip |
GO to cideo with url
-rw-r--r-- | youtube/search.py | 4 |
1 files changed, 2 insertions, 2 deletions
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")) |