The Movie Database támogatás

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 válasz érkezett (1 / 1 oldalból)

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 .

Nem találsz egy filmet vagy egy sorozatot? Jelentkezz be és hozd létre.

Globális

s focus the search bar
p profil menü megnyitása
esc close an open window
? billentyűparancsok ablak megnyitása

Minden média oldalon

b go back (or to parent when applicable)
e go to edit page

On TV season pages

(jobbra nyíl) ugrás a következő évadra
(balra nyíl) vissza az előző évadra

Tévéepizód oldalakon

(jobbra nyíl) ugrás a következő részre
(balra nyíl) vissza az előző részre

Minden kép oldalon

a kép hozzáadása ablak megnyitása

Minden szerkesztő oldalon

t fordítás választó megnyitása
ctrl+ s submit form

On discussion pages

n create new discussion
w toggle watching status
p toggle public/private
c toggle close/open
a open activity
r reply to discussion
l ugrás az utolsó válaszhoz
ctrl+ enter submit your message
(jobbra nyíl) következő oldal
(balra nyíl) előző oldal

Beállítások

Want to rate or add this item to a list?

Bejelentkezés