Add support for /embed urls
This commit is contained in:
parent
310585ae9e
commit
80de90b1bb
@ -272,8 +272,9 @@ def format_bytes(bytes):
|
||||
|
||||
|
||||
@yt_app.route('/watch')
|
||||
def get_watch_page():
|
||||
video_id = request.args['v']
|
||||
@yt_app.route('/embed/<video_id>')
|
||||
def get_watch_page(video_id=None):
|
||||
video_id = request.args.get('v') or video_id
|
||||
if len(video_id) < 11:
|
||||
flask.abort(404)
|
||||
flask.abort(flask.Response('Incomplete video id (too short): ' + video_id))
|
||||
|
Loading…
x
Reference in New Issue
Block a user