from simple_youtube_api.Channel import Channel from simple_youtube_api.LocalVideo import LocalVideo def upload_video(file_path): # loggin into the channel channel = Channel() channel.login("client_secret_6793728376-alv7pcqjm3psoibm3rd0cvuhu9uomolr.apps.googleusercontent.com.json", "credentials.storage") # setting up the video that is going to be uploaded video = LocalVideo(file_path=file_path) # setting snippet video.set_title("Testing link sharing") video.set_description("This is a description") video.set_tags(["this", "tag"]) video.set_category("gaming") video.set_default_language("en-US") # setting status video.set_embeddable(True) video.set_license("creativeCommon") video.set_privacy_status("private") video.set_public_stats_viewable(True) # setting thumbnail # video.set_thumbnail_path('86106086e9594672ad7408913b5a3a24.jpg') # uploading video and printing the results video = channel.upload_video(video) print(video.id) print(video) # liking video # video.like()