Open GoogleCodeExporter opened 8 years ago
Found the issue. Added the error code 400 to the least of retries and got a
bit more info back:
A retriable HTTP error 400 occurred:
{
"error": {
"errors": [
{
"domain": "youtube.video",
"reason": "invalidCategoryId",
"message": "Bad Request",
"locationType": "other",
"location": "body.snippet.categoryId"
}
],
"code": 400,
"message": "Bad Request"
}
}
So as it turns it I was trying to use a category="Film" as is described
somewhere in the youtube v2 api python docs. This version expects an integer
submitted as a string.
Here's an example of how an upload worked for me:
sudo python ~/pathTo/upload_video.py --file="someVideo.mp4" --title="Test
Upload" --description="This is a test" --keywords="test" --category="3"
--privacyStatus="private"
And here's the category codes as I couldn't find a list anywhere:
Film & Animation 1
Autos & Vehicles 2
Howto & Style 3
People & Blogs 4
Entertainment 5
People & Blogs 6
News & Politics 7
Entertainment 8
Comedy 9
Music 10
News & Politics 11
Comedy 12
People & Blogs 13
People & Blogs 14
Pets & Animals 15
Howto & Style 16
Sports 17
Entertainment 18
Travel & Events 19
News & Politics 21
People & Blogs 22
Comedy 23
Entertainment 24
News & Politics 25
Howto & Style 26
Education 27
Science & Technology 28
Nonprofits & Activism 29
Original comment by mi...@finvfx.com
on 13 Apr 2013 at 11:19
Original issue reported on code.google.com by
mi...@finvfx.com
on 13 Apr 2013 at 10:27