Sprijin Bază de date filme (The Movie Database)

Hi how to display trailer from particular movie say for eg: from upcoming movies if selected one movie, where I need to display video trailer. How to get that link.

Thanks.

69 răspunsuri (pe pagina 3 din 5)

Jump to last post

Pagina anterioarăPagina următoareUltima pagină

@travisbell said:

In this case, you can check for keys to be 11 characters client side and show/hide data that way. I have an open ticket to do some validation when the data gets added.

At a bigger scale, the short answer is you can't. TMDb is 100% crowd sourced. Users add all sorts of strange data. Our moderators do their best to lock, validate and clean up data but they're all volunteer and have lives and jobs of their own. We are simply thankful for any time they can afford to help.

Thanks for the great explanation and the quick responses!

How can i query the api to get a download link to a movie

We don't have any download links. Only YouTube ids to trailers.

Hello Travis. Hope you're doing well. Man, I am facing an issue and it'll be great if you could help. See I am using the link to get all video resources with the help of the movie id. And fetching the youtube key of the first element in the string. Its working good, though. But the issues are for some movies I am unable to show my users the trailer as it has been blocked on the copyrights grounds. To bypass this issue I tried to retrieve the youtube key of the second element but it's throwing an error as most of the movies don't have a second element. How should I go around this, then?

@maverickvivek22 The only way I can think of to improve it on your end would be to use the YouTube API yourself with the keys we provide. The YouTube API provides the relevant regional geolocked data as well as whether the video is still available.

There are plans to do some of that integration on our end here eventually but I haven't found time to get to it.

Thanks a lot for showing the way. I'll definitely try and explore and share the work with you. Cheers.

I have the following code:

kwargs = {'append_to_response': 'trailers'}
movie = tmdb.Movies(603).info(**kwargs)
print(movie.get('trailers'))

And the following output:

{u'quicktime': [], u'youtube': [{u'source': u'm8e-FF8MsqU', u'type': u'Trailer', u'name': u'Matrix Trailer HD (1999)', u'size': u'HD'}]}

How can I get the source attribute in here? I'm using Python.

Hi @albertoivo,

Unfortunately, I can't answer anything to do with Python as I have never used it. Unless someone familiar with Python happens to see this you might not get much farther. For coding issues, I usually recommend asking on somewhere like Stack Overflow.

What about tv series traillers? How do we structure the Api call?

It's the same, please do make sure to read the documentation.

https://api.themoviedb.org/3/tv/1399/videos?api_key=###

or with append to response:

https://api.themoviedb.org/3/tv/1399?api_key=###&append_to_response=videos

Cheers.

@travisbell How to get both movie credits and trailers from single API call?

Hi @bgopikrishna,

https://api.themoviedb.org/3/movie/299537?api_key=###&append_to_response=videos,credits

As an example.

@travisbell Thanks.

Hi @travisbell ,

I tried to append the movie details to the response. But I'm getting the response like this.

{
    "status_code": 7,
    "status_message": "Invalid API key: You must be granted a valid key."
}

My request is:

https://api.themoviedb.org/3/movie/157336?api_key={{API_KEY}}&append_to_response=videos

Either your KEY was canceled or was not placed correctly in the Request.
Take a test.
Click to go to your Profile > API: https://www.themoviedb.org/settings/api
At the bottom of the page, below, you'll find the Example API Request.
Use this example to do a search using your browser.
If it works, your key is OK.
If it does not work, let us know right here.

Nu găsiți un film sau un serial? Autentificați-vă pentru a-l crea.

Globale

s focalizează bara de căutare
p deschide meniul profilului
esc închide o fereastră deschisă
? deschide fereastra cu scurtături de la tastatură

Pe paginile media

b mergi înapoi (sau la părinte atunci când este cazul)
e mergi la pagina de editare

Pe paginile sezoanelor filmelor seriale

(săgeată dreapta) mergi la sezonul următor
(săgeată stânga) mergi la sezonul precedent

Pe paginile episoadelor filmelor seriale

(săgeată dreapta) mergi la episodul următor
(săgeată stânga) mergi la episodul precedent

Pe toate paginile de imagini

a deschide fereastra pentru adăugarea de imagini

Pe toate paginile de editare

t deschide selectorul de traduceri
ctrl+ s trimite formularul

Pe paginile de discuții

n crează o discuție nouă
w comută starea de vizionare
p comută publică/privată
c comută închisă/deschisă
a deschide activitatea
r răspunde la discuție
l mergi la ultimul răspuns
ctrl+ enter trimite mesajul
(săgeată dreapta) pagina următoare
(săgeată stânga) pagina precedentă

Setări

Doriți să evaluați sau să adăugați acest articol într-o listă?

Autentificare