دعم الموقع

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 ردود (على هذه الصفحة 1 من 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 .

لم تجد الفلم أو المسلسل ؟ سجل دخولك و انشئها

عام

s ركز شريط البحث
p افتح قائمة الملف الشخصي
esc اغلق النافذة المفتوحة
? افتح نافذة اختصارات لوحة المفاتيح

على كافة صفحات الوسائط

b ارجع للخلف (او للصفحة الام عند التطبيق)
e انتقل لصفحة التعديل

على كافة صفحات موسم المسلسل

(السهم الايمن) انتقل للموسم التالي
(السهم الايسر) انتقل للموسم السابق

على كافة صفحات حلقة المسلسل

(السهم الايمن) انتقل للحلقة التالية
(السهم الايسر) انتقل للحلقة السابقة

على كافة صفحات الصور

a افتح صفحة اضافة الصورة

على كافة صفحات التعديل

t افتح محدد الترجمة
ctrl+ s ارسال النموذج

على صفحات المناقشة

n انشى نقاش جديد
w تبديل حالة المتابعة
p تبديل عام / خاص
c تبديل اغلاق / فتح
a افتح الانشطة
r رد على النقاش
l انتقل لأخر رد
ctrl+ enter أرسل رسالتك
(السهم الايمن) الصفحة التالية
(السهم الايسر) الصفحة السابقة

الاعدادات

هل تريد تقييم او اضافة هذا العنصر للقائمة؟

تسجيل الدخول