我想通過 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
提交
取消