The Movie Database -tuki

Following the answer from Travis Bell in Quora ( http://www.quora.com/Where-do-I-get-movie-data-dump-for-commercial-use ) I started exploring TMDB. I like to know which APIs could help me to make a complete clone of TMDB's database in my local. I believe to continuously keep the local database updated with TMDB probably I can use APIs pointing to changes ( http://docs.themoviedb.apiary.io/#changes ).

9 vastausta (sivulla 1, sivuja yhteensä 1)

Jump to last post

Hi raghavankl,

Building out the database on your end can be done however it makes the most sense, you can then iterate starting at id 1 and move until you hit the id found in the /latest method.

With regards to keeping thing up to date, yes, you would want to use the change methods. The change system is designed to be queried daily for a list of movies (or people) that have been changed, and the you can iterate through those grabbing the updates that are important to you (titles, genes, overviews, etc…)

Hi Travis,

Thanks for your suggestion, will try doing the same.

Hi Travis,

I'm currently iterating through all id's and calling the /movie/id endpoint for each id. I've noticed a very large amount of 404 with this response :

{"status_code":6,"status_message":"Invalid id: The pre-requisite id is invalid or not found."}

I've called the /movie/id endpoint 138432 times and got only 92962 valid responses. Am I doing something wrong?

The latest id as of this writing is 297063, so you'll want to keep going 😉

Yes, there are going to be a lot of 404's. Id's are not reused and every duplicate or invalid entry over the years that has been deleted would result in a 404.

Thanks for the answer Travis :)

Hello, I am having issues with traversing through all the movies for performing a database dump. I am using the php-tmdb/api, php-tmdb/laravel wrappers and can get movie info. However, I cant seem to figure out which pages I can properly make calls such as "$movie = $client->getMoviesApi()->getMovie($id);" on without my program breaking.

I have used cURL and get_headers calls for the http codes but notice a decent amount of 301 returns. This is fine if I assume that only the 404 returns break my api function call, however, in the case of this address "https://www.themoviedb.org/movie/10" the cURL and get_headers calls state it as a 301 but if you visit it, it takes you to a page not found which ends up breaking that api function call.

Does anyone have any ideas on how I can proceed with traversing the entire movies and avoid broken urls?

Hi MateuszK,

For this specific case (let me know if you have others) id 10 is a collection. Movies and collections share the same ID space.

https://www.themoviedb.org/collection/10

I can probably redirect collections ids to there proper collection URL's but until then, the easiest thing to check would probably just be whether the id is a collection first.

Thanks Travis!

@MateuszK I have made a Laravel wrapper based off of one of the existing PHP wrappers.

https://github.com/Kryptonit3/TMDB-Laravel

Etkö löydä elokuvaa tai TV-ohjelmaa? Kirjaudu sisään lisätäksesi se.

Koko sivustolla

s keskitä hakukenttään
p avaa profiilivalikko
esc sulje avoin ikkuna
? avaa pikanäppäinikkuna

Mediasivuilla

b palaa takaisin (tai hakemistoon mikäli mahdollista)
e siirry editoimaan sivua

TV-sarjan kausien sivuilla

(oikea nuolinäppäin) siirry seuraavaan kauteen
(vasen nuolinäppäin) siirry edelliseen kauteen

TV-sarjan jaksojen sivuilla

(oikea nuolinäppäin) siirry seuraavaan jaksoon
(vasen nuolinäppäin) siirry edelliseen jaksoon

Kaikilla kuvasivustoilla

a avaa "lisää kuva" ikkuna

Kaikilla muokkaus-sivuilla

t avaa kielivalinta
ctrl+ s Lähetä lomake

Keskustelu sivuilla

n luo uusi keskustelu
w vaihda seurannan asetus
p vaihda julkinen/yksityinen asetus
c vaihda avaa/sulje asetus
a avaa viimeaikainen toiminta
r vastaa keskusteluun
l siirry viimeisimpään vastaukseen
ctrl+ enter Lähetä viesti
(oikea nuolinäppäin) seuraava sivu
(vasen nuolinäppäin) edellinen sivu

Asetukset

Haluatko pisteyttää vai lisätä tämän nimikkeen listaan?

Kirjaudu

Ei rekisteröitynyt jäsen?

Rekisteröidy ja liity mukaan yhteisöön