playlist_bot.py
def add_video(self, video_id):
        """ For a video id, add it to the list of videos in the playlist """

        try:
            playlistitems_insert_response = youtube.youtube.playlistItems().insert(
              part="snippet,status",
              body=dict(
                snippet=dict(
                  playlistId="%s" % self.id,
                  resourceId=dict(
                    kind="youtube#video",
                    videoId="%s" % video_id
                  )
                )
              )
            ).execute()

            self.videos.append(video_id)

        except HttpError:
            logging.error("video_id %s threw a http error" % video_id)
 For a video id, add it to the list of videos in the playlist 
For a video id, add it to the list of videos in the playlist
For a video id add it to the list of videos in the playlist
def add_video(self, video_id):
        try:
            playlistitems_insert_response = youtube.youtube.playlistItems().insert(
              part="snippet,status",
              body=dict(
                snippet=dict(
                  playlistId="%s" % self.id,
                  resourceId=dict(
                    kind="youtube#video",
                    videoId="%s" % video_id
                  )
                )
              )
            ).execute()
            self.videos.append(video_id)
        except HttpError:
            logging.error("video_id %s threw a http error" % video_id)
def add_video ( self , video_id ) : try : playlistitems_insert_response = youtube . youtube . playlistItems ( ) . insert ( part = "snippet,status" , body = dict ( snippet = dict ( playlistId = "%s" % self . id , resourceId = dict ( kind = "youtube#video" , videoId = "%s" % video_id ) ) ) ) . execute ( ) self . videos . append ( video_id ) except HttpError : logging . error ( "video_id %s threw a http error" % video_id )
For a video id, add it to the list of videos in the playlist
For a video id add it to the list of videos in the playlist
""" For a video id, add it to the list of videos in the playlist """
self
video_id