def addFeed(self, user, session_token, url, title = None, site = None): ''' anyadir un feed ''' new = Feed() new.rss = url data = rss.parse(url) if site is None: try: new.site = data.feed.link except: new.site = "" if title is None: try: new.title = data.feed.title except: new.title = "" feed_loader = PostgresFeedLoader() feed_loader.setCredentials(user, session_token) feed_loader.save(new)