@app.route('/youtube/<int:number>')
def yandex_video(number):
links = ["https://www.youtube.com/embed/8EIIbkIlFrs",
"https://www.youtube.com/embed/IfTlqfHq1d8",
"https://www.youtube.com/embed/kwcv4FHoCmI",
"https://www.youtube.com/embed/99LUrxEZEnM",
"https://www.youtube.com/embed/rTQKXZ7jk7k",
]
html_data = '''
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
crossorigin="anonymous">
<title>видео ^_^</title>
</head>
<body>
'''
for i in range(number):
html_data += f'''
<center>
<iframe width="560" height="315" src={links[i]}
frameborder="0" allowfullscreen></iframe>
</center>
'''
html_data += '''
</body>
</html>
'''
return html_data
Бекапте конфиги, используйте safe mode и аналоги - не знаю что конкретно у ваших железок есть.