Giter Club home page Giter Club logo

trakt---letterboxd-import's Introduction

trakt---letterboxd-import

Import Letterboxd movie list (diary or movie list) into trakt.tv. Tested with python 3.10.

Usage:

  1. Export your Letterboxd data (under Settings->Import&Export)
  2. Create a trakt.tv application (http://trakt.tv/oauth/applications). Use "urn:ietf:wg:oauth:2.0:oob" as the redirect URI.
  3. Fill in the client id, client secret and the code in the python file. The code is obtained by pointing your browser to the Pin-URL.
  4. (a) For diary: $ python py-trakt-letterboxd-import.py diary.csv
  5. (b) For watched: $ python py-trakt-letterboxd-import.py --watched watched.csv

Note for the watched.csv: If you choose the watched.csv file every movie marked as watched in letterboxd will be imported. However, since there is no date given at which you have watched the movies (like for the diary), all of them will be imported for the same day and time (time of import) in trakt.tv. Furthermore in some rare cases there is no year given/set for some movies in the watched.csv file and therefore the import stops with an error unless you manually set it.

Optional

There is the possibility to optionally use an API for retrieving the imdB id for each movie. This can help if some of the movies have a different title at letterboxd than on imdb or trakt. However, in most cases this is not needed and the import will take longer when using the API.

If you decide to use it set CHECK_IMDB_ID = True and specify an API Url. Typical APIs to use:

  1. OmdB Api (was free, currently is private only and you need to apply for an API key) (typically 1000keys per day are given out for free)
  2. (outdated) TheApache64 API A free IMDB Api provided by github User theapache64. An implentation into the trakt-letterboxd importer can be found in this branch: Click

Thanks

Some code-parts were taken from https://github.com/akampjes/trakt-list-import !

trakt---letterboxd-import's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

trakt---letterboxd-import's Issues

import more than 100 movies

For some reason the script stops after 100 Movies?

102movies in file.
Importing first 100 movies...

is there any reason for that?

SIMKL to Trakt

Could you make script to import from SIMKL to Trakt Watched.

Import custom list

Hey,

I love this software a lot.
I would love it if I could import a custom list from Letterboxd into a custom list from Trakt

greetings
Nigel

Multiple issues

There are currently multipls issues with this script

main issue was that urllib.quote_plus has been moved to urllib.parse.quote_plus, after changing that, i couldn't get authentication to work with imdb enabled, no matter what, tried deleting the app from trakt and generating a new client id and secret, generating a new pin, but nothing worked, it always throws a 401 error, i had to disable the imdb check to get it working.

Python file closing

How do I "Fill in the client id, client secret and the code in the python file"? They close pretty much immediately after i open them.

My First time

I don't know nothing about coding and this is the first time me using GitHub I want to do this put unfortunately I understand nothing lol can someone help and by sending a video of how to do this in a iPhone

Make this script also work with the watched.csv?

Hi there,
thanks very much for this nice script! I already imported my diary. Could you adapt this script or provide a second one to also upload the watched.csv? I' getting the error

Traceback (most recent call last):
File "py-trakt-letterboxd-import.py", line 185, in
data = get_data_letterboxd_diary(letterboxd_file[0])
File "py-trakt-letterboxd-import.py", line 115, in get_data_letterboxd_diary
data.append([row[1],row[2],row[6]+' 20:15',imdbid])
IndexError: list index out of range`

and i think it's due to a missing element [6], because of course the watched ones not necessarily have a date when they have been watched by me.

Cannot get the OAuth to work

This may just be a problem with me and not the program itself.

I am always failing the authentication checks, when I try to use the PIN code (which I get from clicking the "Authorize" button in the OAuth section from the Redirect URI section of the custom user-created Letterboxd import app). Is there another code I should be using? Has the backend Trakt code changed?

Script aborts with incomplete data

Hi, I bumped into the following error while running the script. It worked for my diary.csv, but this happened when importing watched.csv:

['Return of the Jedi', '1983', '2016-12-13T16:54:14.939219', u'tt2301123']
Get imdbID for Star Wars: Episode V - The Empire Strikes Back (Theatrical Version)()
Traceback (most recent call last):
  File "py-trakt-letterboxd-import.py", line 195, in <module>
    data = get_data_letterboxd(letterboxd_file[0],use_diary_file)
  File "py-trakt-letterboxd-import.py", line 109, in get_data_letterboxd
    imdbinfo = get_imdb_info(row[1], year=int(row[2]))
ValueError: invalid literal for int() with base 10: ''

The script aborts after that message. This is what line 26 in watched.csv looked like:

2012-05-02,Star Wars: Episode V - The Empire Strikes Back (Theatrical Version),,

After adding the missing information manually, the script resumed working:

2012-05-02,Star Wars: Episode V - The Empire Strikes Back (Theatrical Version),1980,http://letterboxd.com/film/the-empire-strikes-back/

This is just a heads-up that Letterboxd seems to sometimes export incomplete data. I'm guessing the script could use a fall-back for these cases. Either way, thanks for the script, very useful!

The OMDb API has gone private

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

  • put a note regarding this problem in your README,
  • add a constant where the user could provide her or his private key
  • or just set imdbid = None and comment lines 109-116 until the OMDb API is free again.

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

ValueError

ValueError: invalid literal for int() with base 10: ''

screen shot 2018-01-13 at 1 48 24 pm

Confused

Hi, I don't know much about code and I'm kinda confused as to what Step 4 is supposed to be. What is "$ python py-trakt-letterboxd-import.py diary.csv" and how am I supposed to use it?
Thank you

Netflix.csv Import

I apologize if this is the wrong section to request but I am not too familiar with github and had stumbled upon this tool.

Is it possible to add a branch to import netflix.csv files to trakt?

I looked at the letterbox'd import lists and saw that it's very similar to the netflix.csv and was going to try and import via that but figured I'd ask before trying and messing anything up.

Chance of duplicate Entries

I have 1000 entries on trakt and 1500 entries on Letterboxd. If I run the script, will it ignore the already watched movies or is there any possiblity for double entries?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.