Comments (1)
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 [email protected]
on 13 Apr 2013 at 11:19
from youtube-api-samples.
Related Issues (13)
- Upload a video to youtube - python api error
- Patch for /samples/java/youtube-cmdline-liststreams-sample/src/main/java/com/google/api/services/samples/youtube/cmdline/youtube_cmdline_liststreams_sample/ListStreams.java
- The Request was aborted: The request was canceled (dotnet upload) HOT 2
- compilation of youtube-cmdline-uploadvideo-sample fails
- Patch for /samples/javascript/search.html
- Provide web version of ASP.Net Samples
- Patch for yt_analytics_report.py
- Patch for /samples/dotnet/upload_video.cs
- "youtubeSignupRequired : Unauthorized" error if the user doesn't have channel HOT 1
- upload_video.py - TypeError: argument of type 'NoneType' is not iterable HOT 8
- Clicking on red play button on embedded video doesnt start the video on Ios devices
- Patch for /samples/java/youtube-cmdline-uploadvideo-sample/src/main/java/com/google/api/services/samples/youtube/cmdline/youtube_cmdline_uploadvideo_sample/UploadVideo.java
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from youtube-api-samples.