Git Product home page Git Product logo

Comments (1)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.