Suporte do The Movie Database

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?

2 respostas (na página 1 de 1)

Jump to last post

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:

https://api.themoviedb.org/3/tv/688/images?api_key=###&language=en&include_image_language=null,en

Now, you can do this and the primary TV show data in one call by using append_to_response:

https://api.themoviedb.org/3/tv/688?api_key=###&append_to_response=images&language=en&include_image_language=null,en

Cheers.

Fantastic. Thanks for the help!

Não consegue encontrar um certo filme ou série? Inicie sessão e adicione-o.

Geral

s focus the search bar
p abrir menu do perfil
esc close an open window
? open keyboard shortcut window

Em páginas de Média

b go back (or to parent when applicable)
e ir para a página de edição

Em páginas de temporadas de séries

(seta para a direita) ir para a próxima temporada
(seta para a esquerda) ir para a temporada anterior

Em Páginas de Episódios de Séries

(seta para a direita) ir para o próximo episódio
(seta para a esquerda) ir para o episódio anterior

Em Todas as Páginas de Imagens

a abrir janela para adicionar imagem

Em Todas as Páginas de Edição

t open translation selector
ctrl+ s submit form

Em Páginas de Discussão

n criar uma nova discussão
w toggle watching status
p toggle public/private
c toggle close/open
a abrir actividade
r reply to discussion
l ir para a última resposta
ctrl+ enter submit your message
(seta para a direita) página seguinte
(seta para a esquerda) página anterior

Definições

Deseja classificar ou adicionar este item a uma lista?

Iniciar Sessão

Ainda não é um membro?

Crie uma Conta e Adere a Comunidade