دعم الموقع

Hey folks,

I hope y'all are doing well today. I'm trying to find french titles for movies using their TMDB IDs using the API. I'd say that it works well for about 50% of them, using a call to https://api.themoviedb.org/3/movie/TMDBID?api_key=REDACTED&language=fr-FR, but for the rest, it doesn't. I tried to combine the use of the alternative_titles endpoint as well but, still, some french titles are nowhere to be found using the API.

Here's a perfect example: let's take the movie 14 Peaks - Nothing is Impossible (TMDB ID : 890825).

{[...],"original_language":"en","original_title":"14 Peaks: Nothing Is Impossible",[...]"title":"14 Peaks: Nothing Is Impossible","video":false,"vote_average":7.423,"vote_count":222}
{"id":890825,"titles":[{"iso_3166_1":"ES","title":"Los 14 ochomiles: No hay nada imposible","type":""},{"iso_3166_1":"GB","title":"14 Peaks","type":""}]}
{"id":890825,"titles":[]}

None of those API calls fetch the actual french title for this movie, which is 14 x 8000 : Aux sommets de l'impossible. Well, maybe TMDB simply doesn't have it in store, right?

Let's browse to the movie page from a French IP address to make sure: https://www.themoviedb.org/movie/890825-14-peaks-nothing-is-impossible

https://gcdnb.pbrd.co/images/dLurINCd9Ck9.png

They have it. It's correctly displayed on the website, but nowhere to be found using the API.

I'm baffled. Am I missing something obvious here?

Thanks in advance to everyone who will take the time to try and help me out!

Kind regards.

6 ردود (على هذه الصفحة 1 من 1)

Jump to last post

Alright folks, did some digging. Here's what I found out:

  • Requesting the web page with this Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7 header correctly yields the french title for a movie, every time.
  • I've typed up a short script real quick to compare the results of 1) API (movie endpoint & alternative titles endpoint combined) and 2) scraping the website, and the results are obvious. Here is an excerpt:
[!] Got different results comparing the API and the website:

[API] French title for ['Til Madness Do Us Part] : 'Til Madness Do Us Part
[HTML] French title for ['Til Madness Do Us Part] : À la folie
________________________________________
[!] Got different results comparing the API and the website:

[API] French title for [7 Prisoners] : 7 Prisoners
[HTML] French title for [7 Prisoners] : 7 Prisonniers
________________________________________
[!] Got different results comparing the API and the website:

[API] French title for [12 Angry Men] : 12 Angry Men
[HTML] French title for [12 Angry Men] : Douze Hommes en colère
________________________________________
[!] Got different results comparing the API and the website:

[API] French title for [The 13th Warrior] : The 13th Warrior
[HTML] French title for [The 13th Warrior] : Le 13ème Guerrier
________________________________________
[!] Got different results comparing the API and the website:

[API] French title for [14 Peaks: Nothing Is Impossible] : 14 Peaks: Nothing Is Impossible
[HTML] French title for [14 Peaks: Nothing Is Impossible] : 14 x 8000 : Aux sommets de l'impossible
________________________________________
[!] Got different results comparing the API and the website:

[API] French title for [21 Grams] : 21 Grams
[HTML] French title for [21 Grams] : 21 grammes
________________________________________

Guess I'm simply going to scrape the web pages for now, since it appears that their backend has access to an up-to-date, working database that has all the correct french titles in it, as opposed to the public API :(

When I make the API Request for my language (pt-BR) I receive it in my language, correctly.
https://api.themoviedb.org/3/movie/890825?api_key=THE_KEY&language=pt-BR
But when I do it using the fr-FR language, I get it in the default language, in English or en-US.
https://api.themoviedb.org/3/movie/890825?api_key=THE_KEY&language=fr-FR

Yes, I think something is wrong.
The answer is given as if it doesn't exist in fr-FR.
But in fact it exists.
Only Travis Bell the admin can resolve this.
Let's wait for him to come by.

Is there some news regarding this point? I am also interested in getting the translated french file name and doing it with either fr-CH or fr-FR doesn't help. Most of them are translated, few others are not.

It looks more like a data issue than a general header handling issue.

Thank's for any update

@frederic.blanc@bluewin.ch What's an example request that isn't yielding the data you expect?

@frederic.blanc@bluewin.ch said:

Is there some news regarding this point? I am also interested in getting the translated french file name and doing it with either fr-CH or fr-FR doesn't help. Most of them are translated, few others are not.

It looks more like a data issue than a general header handling issue.

Thank's for any update

Today I redid the 3 API Requests, using my Firefox browser, correcting the error or lack of language-COUNTRY specification.

https://api.themoviedb.org/3/movie/890825?api_key=THE_KEY&language=fr-FR  

The answer was correct.
With title and overview in fr-FR

https://api.themoviedb.org/3/movie/890825/alternative_titles?api_key=THE_KEY&language=fr-FR  

The answer was correct.
I received the list with all the alternative titles that this film has.
Spain, ES, and Great Britain, GB.

https://api.themoviedb.org/3/movie/890825/alternative_titles?api_key=THE_KEY&country=FR  

The answer was correct.
No alternate title for France, FR, because in this movie there is no alternate title for France, FR.
If you change the parameter to "&country=ES" you will see the alternative title for Spain. ES.

So, I still don't understand what the problem is.
In my browser I get the correct answers.
It remains to be seen how you are sending the Requests in your code programming.

Mmh, I don't know were I was looking, but I confirm that now it works perfectly :) Thank's for your time and investigation

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

عام

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

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

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

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

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

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

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

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

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

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

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

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

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

الاعدادات

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

تسجيل الدخول