nliautaud / imdbify

Convert a movie list to IMDb-like CSV
MIT License
4 stars 0 forks source link

the live version does not work #2

Open robot2xl opened 6 years ago

robot2xl commented 6 years ago

The live version (https://rawgit.com/nliautaud/imdbify/master/imdbify.html) does not work.

Will it be a problem with the OMDB api?

Please fix.

Thanks!

nliautaud commented 6 years ago

Hi, thanks for the report.

It seems that OMDb isn't free anymore indeed, and require a 1$/mo subscription to remove the 1000 request a day limitation. https://www.patreon.com/bePatron?u=5038490

It may be better to switch to TMDb, which have a more flexible free api, and can be queried by IMDb ID https://developers.themoviedb.org/3/find/find-by-id but that would require a bit more thoughts as several imdb-oriented fields would be impacted, like rating, votes, genre.

In the meantime, if you have an OMDb key you can change the api call to include it.

https://github.com/nliautaud/imdbify/blob/ead74ca41b820181f7b1bc9d121cbd5964553091/src/main.js#L54

https://www.omdbapi.com/?apikey=${key}&i=${id}
robot2xl commented 6 years ago

I requested the API and I received this email:

Here is your key: XXXXXXXX Please append it to all of your API requests. OMDb API: http://www.omdbapi.com/?i=tt3896198&apikey=XXXXXXXX

I put the line in this way and everything worked.

    totalCount = Object.keys(data).length;
    updateProgress();
    for (id in data)
        httpGetAsync('https://www.omdbapi.com/?apikey=XXXXXXXX&i=' + id, httpCallback);
}

Thank you. 👍

(The Xs are in substitution of the real numbers)