Trakt.tv is a service where you can subscribe, rate, comments movies or TV shows. It also have integration with some multimedia app such as XBMC, KODI, etc.
This script will import ratings from IMDB csv output and import it to Trakt.tv using their v2 API via OAuth.
The script is realtively simple < 106 lines of code. You can modify it according to your needs:
- If you have some time out problem, you might want to reduce the batch (currently 20 shows/movies) per batch.
- You could also filter out TV Shows if you don't want to include them. Just modify the request
Warning: The author doesn't guarantee anything including the outcome of the running the script. use at your own risk!.
- Login to IMDB
- Form "Your Name" drop down, select "Your Lists"
- Select "Your Ratings" list
- At the bottom of the page there is link "Export this list"
- Save the file on your computer
clone the repository
Make sure you have ruby * bundler installed
Most osx already came with ruby installed. to check
$ ruby -v
to install bundler
$ gem install bundler
# or with sudo
$ sudo gem install bundler
after bundler is install, download dependency with
$ bundle
In order to use OAUTH, you need to create an application on trakt.tv
- Go to Create Application on trakt.tv
- Enter Name & Description as you wish
- Enter Redirect uri:
urn:ietf:wg:oauth:2.0:oob
- Tick checking & scrobble
- Copy "Client ID" & "Client Secret"
suppose you have the csv file name 'ratings-imdb.csv' in the same directory as the project
execute
$ bundle exec ruby import.rb ratings-imdb.csv
- it will ask for "Client ID" and "Client Secreet" you obtain erlier. Copy paste (and enter) for each value
- It will then ask you to open link in the browser. Login with your account and authorize the app.
- Copy the "OAUTH AUTHORIZATION CODE" to the terminal
- It will then post all the reatings & history (mark as watched) data from IMDB to trakt.