我想通过 Flask 应用程序在我的 html 文档中接收 Youtube 嵌入视频,所以我在数据库中有嵌入视频的链接,并且我能够获取链接,但它只是文本格式请帮助我选择正确的数据类型数据库Python代码: class Youtube(db.Model): sno = db.Column(db.Integer, primary_key=True) embeded_video = db.Column(db.String(100), nullable=False)@app.route("/videos/fixing")def fixingpage(): posts = Youtube.query.filter_by().all() return render_template('post.html', posts=posts)Html 代码 (post.html) : - <div>{{ posts.embeded_video }} </div>输出 :-It is printing as it is embeding link<iframe src="https://www.youtube.com/embed/OWN03n12VAc" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> Insted of it I want video to be Inserted
添加回答
举报
0/150
提交
取消