Assistance de TMDB

And how can i increase the maximum data per api request? if i want to get the description the data is cut off in the middle. that results in an err

For better understanding here ist the pull process (shorted):

def movie_db_post_request(url):
    headers = {
        "accept": "application/json",
        "Authorization": f"Bearer {tmdb_key}"
    }

    return requests.get(url, headers=headers)
language = "de-DE"
movie_id = "Star Wars"
basis_url = 'https://api.themoviedb.org/3/search/movie?'
        url = f'{basis_url}query={movie_id}&language={language}&page=1'

response = movie_db_post_request(url)

data = response.json()
print("DATA respponse.json():", data)

 first_movie = data["results"][0]

element = {
        "id": index,
        "title": first_movie ["original_title"],
        "description": first_movie ["overview"],
        "rating": first_movie ["runtime"],
        "image": f'https://image.tmdb.org/t/p/w500{first_movie ["poster_path"]}',
        "videoUrl": f'https://www.youtube.com/results?search_query={first_movie ["original_title"]}'
    }


4 réponses (sur la page 1 sur 1)

Jump to last post

For example looks like this: 2024-01-12 19:43:21 DATA response.json(): {'page': 1, 'results': [{'adult': False, 'backdrop_path': '/6t8ES1d12OzWyCGxBeDYLHoaDrT.jpg', 'genre_ids': [28, 12, 878], 'id': 330459, 'original_language': 'en', 'original_title': 'Rogue One: A Star Wars Story', 'overview': 'Die mehrfach verurteilte Jyn Erso passt gut ins Anforderungsprofil für die Rebellion gegen das galaktische Imperium. Sie ist hart, kompromisslos und steht außerhalb der Gesellschaft. Aber es gibt noch einen weiteren, ganz speziellen Grund für ihre Anheuerung. Ihr Vater wurde vor Jahren von dem imperialen Karrieristen Krennic dazu gezwungen, für den Imperator eine neue Superwaffe zu entwickeln: den Todesstern. Dabei hat er heimlich eine Schwachstelle eingebaut und diese mit einem Hilferuf an die Rebellenallianz geschickt. Um diese Schwäche ausnützen zu können, bedarf es allerdings der genauen Baupläne der Waffe. Zusammen mit dem Spion Cassian Andor und einer Schar unerschrockener Kä

@wired87 said:
how can i increase the maximum data per api request?
For example looks like this: 2024-01-12 19:43:21 DATA response.json(): {'page': 1, 'results': [{'adult': False, 'backdrop_path': '/6t8ES1d12OzWyCGxBeDYLHoaDrT.jpg', 'genre_ids': [28, 12, 878], 'id': 330459, 'original_language': 'en', 'original_title': 'Rogue One: A Star Wars Story', 'overview': 'Die mehrfach verurteilte Jyn Erso passt gut ins Anforderungsprofil für die Rebellion gegen das galaktische Imperium. Sie ist hart, kompromisslos und steht außerhalb der Gesellschaft. Aber es gibt noch einen weiteren, ganz speziellen Grund für ihre Anheuerung. Ihr Vater wurde vor Jahren von dem imperialen Karrieristen Krennic dazu gezwungen, für den Imperator eine neue Superwaffe zu entwickeln: den Todesstern. Dabei hat er heimlich eine Schwachstelle eingebaut und diese mit einem Hilferuf an die Rebellenallianz geschickt. Um diese Schwäche ausnützen zu können, bedarf es allerdings der genauen Baupläne der Waffe. Zusammen mit dem Spion Cassian Andor und einer Schar unerschrockener Kä

What language is specified in "&language=" in the API Request?
de-DE (Germany) or de-AT (Austria)?

Problems with API Request

In order for someone to help you with API Request questions,
it is critical that you post here the API Request you are sending to the TMDb server.
Remember to replace your Key with MY_KEY , YOUR_KEY , THE_KEY , or something like that.

Not the programming code/script you used to build the API Request.
But the API Request that is sent to the TMDb server.
Or the API Request you would like to send.

@ticao2 said:

@wired87 said:
how can i increase the maximum data per api request?
For example looks like this: 2024-01-12 19:43:21 DATA response.json(): {'page': 1, 'results': [{'adult': False, 'backdrop_path': '/6t8ES1d12OzWyCGxBeDYLHoaDrT.jpg', 'genre_ids': [28, 12, 878], 'id': 330459, 'original_language': 'en', 'original_title': 'Rogue One: A Star Wars Story', 'overview': 'Die mehrfach verurteilte Jyn Erso passt gut ins Anforderungsprofil für die Rebellion gegen das galaktische Imperium. Sie ist hart, kompromisslos und steht außerhalb der Gesellschaft. Aber es gibt noch einen weiteren, ganz speziellen Grund für ihre Anheuerung. Ihr Vater wurde vor Jahren von dem imperialen Karrieristen Krennic dazu gezwungen, für den Imperator eine neue Superwaffe zu entwickeln: den Todesstern. Dabei hat er heimlich eine Schwachstelle eingebaut und diese mit einem Hilferuf an die Rebellenallianz geschickt. Um diese Schwäche ausnützen zu können, bedarf es allerdings der genauen Baupläne der Waffe. Zusammen mit dem Spion Cassian Andor und einer Schar unerschrockener Kä

What language is specified in "&language=" in the API Request?
de-DE (Germany) or de-AT (Austria)?

Problems with API Request

In order for someone to help you with API Request questions,
it is critical that you post here the API Request you are sending to the TMDb server.
Remember to replace your Key with MY_KEY , YOUR_KEY , THE_KEY , or something like that.

Not the programming code/script you used to build the API Request.
But the API Request that is sent to the TMDb server.
Or the API Request you would like to send.

Alright, i have updated it. (there may are some spelling errors because i was typing it here in the box but in my IDE i dont ahve any Synthax errors)

@wired87 said:
Alright, i have updated it. (there may are some spelling errors because i was typing it here in the box but in my IDE i dont ahve any Synthax errors)

I tested using my Firefox browser.
https://api.themoviedb.org/3/search/movie?api_key=THE_KEY&query=Star%20Wars&language=de-DE&page=1
Could you test the same using the API Request above in a new tab in your browser?
And also again your Request to check if the answers are different?
I believe I received the correct answer, the entire text.

vote_count  131
13  
adult   false
backdrop_path   "/6t8ES1d12OzWyCGxBeDYLHoaDrT.jpg"
genre_ids   
0   28
1   12
2   878
id  330459
original_language   "en"
original_title  "Rogue One: A Star Wars Story"
overview    "Die mehrfach verurteilte Jyn Erso passt gut ins Anforderungsprofil für die Rebellion gegen das galaktische Imperium. Sie ist hart, kompromisslos und steht außerhalb der Gesellschaft. Aber es gibt noch einen weiteren, ganz speziellen Grund für ihre Anheuerung. Ihr Vater wurde vor Jahren von dem imperialen Karrieristen Krennic dazu gezwungen, für den Imperator eine neue Superwaffe zu entwickeln: den Todesstern. Dabei hat er heimlich eine Schwachstelle eingebaut und diese mit einem Hilferuf an die Rebellenallianz geschickt. Um diese Schwäche ausnützen zu können, bedarf es allerdings der genauen Baupläne der Waffe. Zusammen mit dem Spion Cassian Andor und einer Schar unerschrockener Kämpfer bricht Jyn daraufhin zu dem Planeten Scarif auf, um die dort lagernden Baupläne des Todessterns zu erbeuten. Ein Himmelfahrtskommando, zumal der Rat der Rebellen aufgrund der vagen Informationen jegliche Unterstützung verweigert."
popularity  74.911
poster_path "/xRGeAT2dAYmHT5ucsYBj4xegKdV.jpg"
release_date    "2016-12-14"
title   "Rogue One: A Star Wars Story"
video   false
vote_average    7.489
vote_count  14567
14  
adult   false

Un film, une émission télévisée ou un artiste est introuvable ? Connectez-vous afin de créer une nouvelle fiche.

Général

s Mettre le curseur dans la barre de recherche
p Ouvrir le menu du profil
esc Fermer une fenêtre ouverte
? Ouvrir la fenêtre des raccourcis clavier

Sur les pages des médias

b Retour (ou vers le parent si faisable)
e Afficher la page de modification

Sur les pages des saisons des émissions télévisées

Afficher la saison suivante (flèche droite)
Afficher la saison précédente (flèche gauche)

Sur les pages des épisodes des émissions télévisées

Afficher l'épisode suivant (flèche droite)
Afficher l'épisode précédent (flèche gauche)

Sur toutes les pages des images / photos

a Ouvrir la fenêtre d'ajout d'image / photo

Sur toutes les pages de modifications

t Ouvrir le sélecteur de traduction
ctrl+ s Envoyer le formulaire

Sur les pages des discussions

n Créer une nouvelle discussion
w Basculer le statut de suivi
p Basculer publique / privée
c Basculer fermer / ouvrir
a Ouvrir l'activité
r Répondre à la discussion
l Afficher la dernière réponse
ctrl+ enter Envoyer votre message
Page suivante (flèche droite)
Page précédente (flèche gauche)

Paramètres

Vous souhaitez évaluer ou ajouter cet élément à une liste ?

Connexion