我正在使用python创建一个带有api youtube流媒体的广播。 我每天都想创建一个计划视频,并使用相同的URL访问流式传输。 所以在我的代码中我添加了isDefaultBroadcast = True
# Create a liveBroadcast resource and set its title, scheduled start time,
# scheduled end time, and privacy status.
def insert_broadcast(youtube, options):
insert_broadcast_response = youtube.liveBroadcasts().insert(
part="snippet,status",
body=dict(
snippet=dict(
title=options.broadcast_title,
isDefaultBroadcast=True,
scheduledStartTime=options.start_time,
scheduledEndTime=options.end_time
),
status=dict(
privacyStatus=options.privacy_status
)
)
).execute()
但我收到了错误403
An HTTP error 403 occurred:
{
"error": {
"errors": [
{
"domain": "youtube.liveBroadcast",
"reason": "liveBroadcastBindingNotAllowed",
"message": "The binding is not allowed"
}
],
"code": 403,
"message": "The binding is not allowed"
}
}
我在liveStream部分添加了isDefaultStream,没有任何问题。
知道出了什么问题吗?