I m iterating on a json.loads
object that have all the info i need (original_title)
When i iterate on it i got incomplete result.
Where is my mistake ? How can i improve this code to have complete result?
我的法典:
TMDB_TOKEN = "PUT YOURS HERE IF YOU WANNA TEST"
headers = {
"accept": "application/json",
"Authorization": TMDB_TOKEN
}
id = 17520
url = "https://api.themoviedb.org/3/person/{person_id}/movie_credits".format(person_id=id)
response = requests.get(url, headers=headers,)
parsed = json.loads(response.text)
print(json.dumps(parsed, indent=1))
all_filmo = { "doc":[] , cinema : [] , "tv" : [] }
for i in parsed[ cast ]:
print(i[ original_title ])
你们可以看到存在失踪的LOT。
<代码>json.dumps。 i 仅保留原始标题
"original_title": "Cinu00e9ma par... Cu00e9dric Klapisch",
"original_title": "Quand Jean devint Renoir",
"original_title": "Toujours pas ... A bout de souffle",
"original_title": "Babyphone",
"original_title": "Un air de famille",
"original_title": "In Transit",
"original_title": "Belmondo l influenceur",
"original_title": "Les Poupu00e9es russes",
"original_title": "Peut-u00eatre",
"original_title": "Casse-Tu00eate Chinois",
"original_title": "Ballerina",
"original_title": "Belmondo, il u00e9tait une fois le beau monde",
"original_title": "L Auberge espagnole",
"original_title": "Ce qui nous lie",
"original_title": "Le Pu00e9ril jeune",
"original_title": "Le ramoneur des lilas",
"original_title": "Babysitter",
"original_title": "L Auberge espagnole",
"original_title": "Les Poupu00e9es russes",
"original_title": "Paris",
"original_title": "Peut-u00eatre",
"original_title": "Ni pour, ni contre (bien au contraire)",
"original_title": "Chacun cherche son chat",
"original_title": "Le Pu00e9ril jeune",
"original_title": "Un air de famille",
"original_title": "Lumiu00e8re et Compagnie",
"original_title": "Riens du tout",
"original_title": "Ma part du gu00e2teau",
"original_title": "Casse-Tu00eate Chinois",
"original_title": "Ce qui me meut",
"original_title": "In Transit",
"original_title": "Ce qui nous lie",
"original_title": "Le ramoneur des lilas",
"original_title": "Deux moi",
"original_title": "Auru00e9lie Dupont, l espace d un instant",
"original_title": "En corps",
"original_title": "Le Poisson rouge",
"original_title": "La Fu00eate du Cinu00e9ma",
"original_title": "La Venue de lu2019Avenir",
"original_title": "Casse-Tu00eate Chinois",
"original_title": "Paris",
"original_title": "Ce qui nous lie",
"original_title": "Les Confins du monde",
"original_title": "Princesses",
"original_title": "Deux moi",
"original_title": "L Auberge espagnole",
"original_title": "Les Poupu00e9es russes",
"original_title": "Paris",
"original_title": "Chacun cherche son chat",
"original_title": "Peut-u00eatre",
"original_title": "Le Pu00e9ril jeune",
"original_title": "Casse-Tu00eate Chinois",
"original_title": "Ce qui me meut",
"original_title": "Ni pour, ni contre (bien au contraire)",
"original_title": "Ma part du gu00e2teau",
"original_title": "Un air de famille",
我的热情结果:
Cinéma par... Cédric Klapisch
Quand Jean devint Renoir
Toujours pas ... A bout de souffle
Babyphone
Un air de famille
In Transit
Belmondo l influenceur
Les Poupées russes
Peut-être
Casse-Tête Chinois
Ballerina
Belmondo, il était une fois le beau monde
L Auberge espagnole
Ce qui nous lie
Le Péril jeune
Le ramoneur des lilas