The Movie Database Support

Hello, Unfortunately I'm unable to get any results when using the credits() method. When the method is called, it runs, but all it displays is "TMDb Obj" , nothing related to the cast or the crew. How can I solve this? , What's the problem here? Thanks in advance. a picture of the code, If it's doesn't display, just ignore it.

2 svar (på sida 1 av 1)

Jump to last post

We can only help you to specify correct API query, if you are using some wrapper library, you must contact its author. As for the credits method, you must specify correct credit_id, which you will find in TV or movie credits. E.g.:

You can call movie credits API method to get a list of actors for movie Hanabi:

https://api.themoviedb.org/3/movie/5910/credits?api_key=###

Which will return json object:

{
  "id": 5910,
  "cast": [
    {
      "cast_id": 10,
      "character": "Nishi Yoshitaka",
      "credit_id": "52fe442cc3a36847f8086943",
      "gender": 2,
      "id": 3317,
      "name": "Takeshi Kitano",
      "order": 0,
      "profile_path": "/xkXZ7HC8uyhu5MtNnbdP8mhdiFN.jpg"
    },
...
}

And then you can call credits method for Takeshi Kitano character:

https://api.themoviedb.org/3/credit/52fe442cc3a36847f8086943?api_key=###

Which will return json with detailed information:

{
  "credit_type": "cast",
  "department": "Acting",
  "job": "Actor",
  "media": {
    "adult": false,
    "backdrop_path": "/zla8dwuIom4ZabzZzqlR8RqGUAx.jpg",
    "genre_ids": [
      80,
      18
    ],
    "id": 5910,
    "original_language": "ja",
    "original_title": "はなび",
    "overview": "A police officer leaves the force in the face of harrowing personal and professional difficulties. Spiraling into a depression, he makes questionable decisions.",
    "poster_path": "/55EBBrHskI3WzmAwGJwGXiSoHBH.jpg",
    "release_date": "1997-09-03",
    "title": "Fireworks",
    "video": false,
    "vote_average": 7.6,
    "vote_count": 227,
    "popularity": 5.895,
    "character": "Nishi Yoshitaka"
  },
  "media_type": "movie",
  "id": "52fe442cc3a36847f8086943",
  "person": {
    "adult": false,
    "gender": 2,
    "name": "Takeshi Kitano",
    "id": 3317,
    "known_for": [
      {
        "adult": false,
        "backdrop_path": "/jGPSVArC0GS2VVc0aGAqGTjfFOG.jpg",
        "genre_ids": [
          28,
          878,
          53,
          18
        ],
        "id": 315837,
        "original_language": "en",
        "original_title": "Ghost in the Shell",
        "overview": "In the near future, Major is the first of her kind: a human saved from a terrible crash, then cyber-enhanced to be a perfect soldier devoted to stopping the world's most dangerous criminals.",
        "poster_path": "/si1ZyELNHdPUZw4pXR5KjMIIsBF.jpg",
        "release_date": "2017-03-29",
        "title": "Ghost in the Shell",
        "video": false,
        "vote_average": 6,
        "vote_count": 5263,
        "popularity": 17.289,
        "media_type": "movie"
      },
...      
}

I think in python it's a bit different, in python it says you need to call credits method and add the movie id as a parameter, so basically I was calling it like this, movie.credits(movie id here) . What is written in the documentary probably isn't usable for python, the credits method should give you information about actors/actresses involved in the movie(their names), not personal information about a single character like it's ID. Regarding the library I'm using, it's called tmdbv3api . Thanks very much .

Kan du inte hitta en film eller tv-serie? Logga in för att skapa den.

Globala

s fokus på sökrutan
p öppna profilmenyn
esc stäng ett öppet fönster
? öppna tangentbordsgenväg fönstret

På mediasidor

b gå tillbaka (eller till förälder när det är tillämpligt)
e gå till redigerings sidan

På tv-säsongssidor

(höger pil) gå till nästa säsong
(vänster pil) gå till den föregående säsongen

På tv-avsnittssidor

(höger pil) gå till nästa avsnitt
(vänster pil) gå till föregående avsnitt

På alla bildsidor

a öppna lägg till bild fönstret

På alla redigeringssidor

t öppna översättnings väljaren
ctrl+ s skicka förmulär

På diskussionssidor

n skapa ny diskussion
w växla sedd-status
p växla offentligt/privat
c växla stäng/öppna
a öppna aktivitet
r svara på diskussionen
l gå till det senaste svaret
ctrl+ enter skicka ditt meddelande
(höger pil) nästa sida
(vänster pil) föregående sida

Inställningar

Vill du betygsätta denna artikel eller lägga till den i en lista?

Logga in