Skip to content

Commit

Permalink
Merge pull request #148 from senchpimy/master
Browse files Browse the repository at this point in the history
Go to the video with the url
  • Loading branch information
user234683 authored Nov 10, 2022
2 parents f9c3f48 + 239cb9c commit b64b81a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions youtube/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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('base.html', title='Search')
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"))
Expand Down

0 comments on commit b64b81a

Please sign in to comment.