def extractYoutubeCommentsToDB(self, songList): db = DBController() for song in songList: try: searchVideoName = song['title'] + ' ' + song['artist'] videoID = self.getVideoID(searchVideoName) comments = self.getComments(videoID) db.insertCommentToDB(song['id'], comments) except Exception as e: print e continue