I'm using the youtube.playlistItems().insert function in a Python script. I know that some videos are already in the targeted playlist, which leads to an error
raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 409 when requesting https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&alt=json returned "Video already in playlist.">
How can I catch this error and just skip the video in question? I searched the insert help doc and the errors doc but could not find the appropriate attribute of my request to access (.error and .httperror did not work).
Thanks