我使用https://github.com/tokland/youtube-upload來上傳視頻,但是,我無法在視頻描述中打破一行。任何方式可以做到這一點?通過YouTube Data API v3在視頻描述中添加新行
例如,我成功與:
C:\Python35\youtube-upload-master\bin>youtube-upload --title="Title" \
--description="This is one line" --category=Music "video.mp4"
我曾嘗試添加轉義序列\\n
,\n
,\r\n
中描述的中間,但它們被加入而不逸出(例如This is \\n one line
)。也試過<br />
,但HTML標籤是不允許的。
[RequestError] Server response: {
"error": {
"errors": [
{
"domain": "youtube.video",
"reason": "invalidDescription",
"message": "The request metadata specifies an invalid video description.",
"locationType": "other",
"location": "body.snippet.description"
}
],
"code": 400,
"message": "The request metadata specifies an invalid video description."
}
}
'\\ n'爲我工作,無需更改代碼 – michabbb
您應該回答,而不是回答正確,''\\ n''是這裏的解決方案。 –