jensb89 / trakt---letterboxd-import

Import Letterboxd movie list (diary) into trakt.tv
90 stars 17 forks source link

The OMDb API has gone private #5

Closed n0ctua closed 7 years ago

n0ctua commented 7 years ago

I just would like to inform you, that the OMDb API has gone private due to the immense traffic they were subjected to. For the time being, one would have to register an private API-Key to use their service and any data request has to be done with: http://www.omdbapi.com/?apikey=[yourkey]& Therefore your script is not working in its current state, because calling the omdb-API without a key returns an 401: Unauthorized error. This is the affected part of your code.

def get_imdb_info(title, year=None):
    if year != None:
        s='http://omdbapi.com/?t='+title+'&y='+str(year)
    else:
        s='http://omdbapi.com/?t='+title
    url = urllib2.urlopen(s.replace(' ','%20'))
    data = url.read()
    res = json.loads(data)
    return res

Maybe you would like to

But as I said, I just wanted to inform you about this problem. Thanks a lot for your work!

jensb89 commented 7 years ago

Hi, I wasn't aware of this. Thanks for the heads up, appreciate it :) I added a note to the Readme. I will leave this open as long as this is fixed

theapache64 commented 7 years ago

I've created a NO-KEY movie_db API with advanced searching algorithm. https://github.com/theapache64/movie_db . @jensb89 @n0ctua

jensb89 commented 7 years ago

Thx @theapache64 but I would need the IMDb id in the output data, that was the only reason I used the omdb API in the first place. Sometimes the name of a movie can be different at letterboxd from the imdb name and that makes the import in trakt.tv more difficult. Also, I think previously trakt.tv could only import a movie when an IMDb id was given. This is not the case anymore, so the id is not that important nowadays (still would be nice to have as it clearly identifies the movie :) )

theapache64 commented 7 years ago

Don' worry @jensb89 . I'll add the imdb id to the response. I'll let you know once i done. If possible, please open an issue. Tnx

theapache64 commented 7 years ago

Hey @jensb89, I've added 'imdb_id' to the response. Try the example : http://theapache64.xyz:8080/movie_db/search?keyword=Ironman . Please let me know if you need any help. :)

jensb89 commented 7 years ago

This is closed now, I've taken out the API calls and made them optionally. As for your API @theapache64 I implemented this in a different branch (because I had to change a little bit more than just the API url). Thx for all your help :)

tommymoran commented 5 years ago

Hi all. I'm learning some iOS development, and discovered this same issue.

It's been resolved. You can request a free key (up to 1,000 calls/day) here. After that, you simply append the API key to the end of the URL.

I believe there is a different URL for the poster images.

http://www.omdbapi.com/apikey.aspx