I\'m trying to insert some data into a database, unfortunately it fails and does not save, I suspect my data is structured in a bad way. The data gets printed nicely (1 titl
if session.query(Presstv).filter_by(link=item.link) == None:
as item is now a object from SQLAlchemy. This probably happened because you are using items['link'] a few lines before that but item is now an instance of that class so you should access its values using .link.