jonnekaunisto / simple-youtube-api

Object-oriented Wrapper for Youtube API in Python
https://simple-youtube-api.rtfd.io
Other
74 stars 16 forks source link

Error when trying to use example code (Update video title) #21

Open DolphinGamerYT opened 4 years ago

DolphinGamerYT commented 4 years ago

I'm trying to update a video title, but I keep getting this:

python Traceback (most recent call last): File "test.py", line 19, in <module> video.update(channel, title="videotitle") TypeError: update() got multiple values for argument 'title'

This is my code:

from simple_youtube_api.YouTubeVideo import YouTubeVideo
from simple_youtube_api.Channel import Channel
from simple_youtube_api.YouTube import YouTube
'''
with open("developer_key", "r") as myfile:
    data = myfile.read().replace("\n", "")
'''
#developer_key = data
youtube = YouTube()
youtube.login("API 1 Key")

video = youtube.search_by_video_id("XXXXXXXXXXX")

channel = Channel()
channel.login("client_secret.json", "credentials.storage")

video.update(channel, title=None)
jonnekaunisto commented 4 years ago

Sorry the update method for the YouTubeVideo is barely functional, I think currently the only thing you can update is the title of the video. If you want to do that then you could do it like this

video.set_channel_auth(channel)
video.update(title="new_title")
Jaydumbass81 commented 2 years ago

I'm trying to update a video title, but I keep getting this:

python Traceback (most recent call last): File "test.py", line 19, in <module> video.update(channel, title="videotitle") TypeError: update() got multiple values for argument 'title'

This is my code:

from simple_youtube_api.YouTubeVideo import YouTubeVideo
from simple_youtube_api.Channel import Channel
from simple_youtube_api.YouTube import YouTube
'''
with open("developer_key", "r") as myfile:
    data = myfile.read().replace("\n", "")
'''
#developer_key = data
youtube = YouTube()
youtube.login("API 1 Key")

video = youtube.search_by_video_id("XXXXXXXXXXX")

channel = Channel()
channel.login("client_secret.json", "credentials.storage")

video.update(channel, title=None)

Hey could you tell me how you setup your client_secret file and your cred.storage file?