Hi there..
Im having problems pulling backdrop related data...
I do OK when searching for showID=1400
url = requests.get('http://api.themoviedb.org/3/tv/1400/images?api_key=........&language=en')
data = url.json()
data_results = data['backdrops']
list = []
for i in data_results:
list.append(i['file_path'])
print(list)
['/8BF7AHKs5GPbKTzIk8f7SUXETD4.jpg', '/s6pU3p3PB87XkIzcG7QZAB7u163.jpg', '/5JeASo9lYlVFi1WQ3KV7fyhXDkx.jpg']
I get empty list when searching for showID=688
url = requests.get('http://api.themoviedb.org/3/tv/688/images?api_key=........&language=en')
data = url.json()
data_results = data['backdrops']
list = []
for i in data_results:
list.append(i['file_path'])
print(list)
[ ]
Why is 688 coming up empty when is really not?
Nu găsiți un film sau un serial? Autentificați-vă pentru a-l crea.
Doriți să evaluați sau să adăugați acest articol într-o listă?
Nu sunteți membru?
Răspuns de Travis Bell
pe data de 12 ianuarie 2016 la ora 4:44 PM
Hi rootraid,
It's because of the
language
param you are using which is filtering the results. Take a read through the "image languages" section of the docs: http://docs.themoviedb.apiary.io/You can add a
include_image_language
param to solve this. You're looking for:Now, you can do this and the primary TV show data in one call by using
append_to_response
:Cheers.
Răspuns de rootraid
pe data de 12 ianuarie 2016 la ora 4:58 PM
Fantastic. Thanks for the help!