GithubHelp home page GithubHelp logo

letterboxd-to-imdb's Introduction

Letterboxd-to-IMDb

GitHub stars Donate

Python script to import your Letterboxd movies into IMDb.

How it works:
The script first "visits" all the Letterboxd links in your zip file and gets the corresponding IMDb page. This way, it can be ensured the correct movie is rated.
After that, your cookie is used to authenticate a request to the internal IMDb GraphQL rating API.

Video tutorial on how to use this: https://www.youtube.com/watch?v=KF7cfdUTEgw

Prerequisites

Run the script

  1. Export your Letterboxd ratings and watchlist (How to)
  2. Get the IMDb cookie and save it as "cookie.txt" in the script folder
  3. Install dependencies: pip install -r requirements.txt
  4. Run letterboxd2imdb.py: python letterboxd2imdb.py -f <YOUR ZIP FILE>.zip

Common use cases

Getting the IMDb cookie

Treat this cookie like your password!

  1. Log into your IMDb account
  2. Open Chrome dev tools -> Network
  3. Filter by Fetch/XHR
  4. Refresh the page
  5. Copy the cookie of one of the requests (Right click -> Copy Value)

Example

Common use cases

Transfer your ratings and watchlist:
py letterboxd2imdb.py -f .\letterboxd-user-2022-02-20-16-16-utc.zip -w

Transfer your watched movies with a rating of 5/10:
py letterboxd2imdb.py -f .\letterboxd-user-2022-02-20-16-16-utc.zip -r 5

Command line options

usage: letterboxd2imdb.py [-h] -f ZIPFILE [-p PARALLEL] [-c] [-r RATING] [-w]

Imports your Letterboxd ratings and watchlist into IMDb

required arguments:
  -f ZIPFILE   The exported zip file from letterboxd

options:
  -h, --help   show this help message and exit
  -p PARALLEL  Urls to be processed in parallel (valid: 1 to 20)
  -c           Add this flag to disable the history
  -r RATING    The rating to give watched but unrated movies. By default they are ignored (valid: 1 to 10)
  -w           Add this flag to also transfer your watchlist

-p: Can be used if you want to speed up the process, if you set it too high you might get rate limited. Default: 5
-c: If the history is causing problems, you can add this flag to disable it.
-r: Can be used to rate watched but unrated movies. Because IMDb doesn't have an option to "just watch", a default rating has to be specified
-w: Used to also transfer your watchlist

Advanced usage example: py letterboxd2imdb.py -f .\letterboxd-user-2022-02-20-16-16-utc.zip -p 10 -r 5 -w

letterboxd-to-imdb's People

Contributors

tobiaspankner avatar

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

Watchers

 avatar  avatar

Forkers

rafalmaleska

letterboxd-to-imdb's Issues

Cant run letterboxd2imdb.py

everything works until I do the run letterboxd2imdb.py step, i get this,

Traceback (most recent call last):
File "C:\Users\samja\OneDrive\Desktop\Letterboxd to imdb\Letterboxd-to-IMDb-master\letterboxd2imdb.py", line 248, in
main()
File "C:\Users\samja\OneDrive\Desktop\Letterboxd to imdb\Letterboxd-to-IMDb-master\letterboxd2imdb.py", line 173, in main
current_files_hash = files_hash(['cookie.txt', args.zipfile])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\samja\OneDrive\Desktop\Letterboxd to imdb\Letterboxd-to-IMDb-master\letterboxd2imdb.py", line 25, in files_hash
with open(file, 'rb') as afile:
^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'letterboxd-samjakub-2023-04-10-18-34-utc.zip'

Error transferring watchlist (code 400)

Transferring the ratings worked perfectly but then when it goes to transfer the watchlist it fails, it displays "Successfully added to watchlist: 0" and in the errors list shows the same error for all the titles "Error adding to IMDb watchlist. Code: 400"
I haven't managed to figure out what could be causing this

Does it work for max too?

I have the probllem that if I put 'pip install -r requirements.txt' in my Terminal on mac it says that it the command is not found. Dou you have abdy idea how to solve that

Cant install requirmeents

pip is not recognized as an internal or external command operable program or batch file.โ€
This message appears to me every time I try to run the dependencies requirements.

Crashes

Everytime I launch Letterboxd2imdb it crashes right away. I tried reinstalling, but nothing helped. I don't think it is a python problem, because python works fine on its own.

can't transfer watchlist

the ratings were transferred successfully but when I try to transfer the watch list I get the following error:

C:\Users\Admin\Desktop\Letterboxd-to-IMDb-master>py letterboxd2imdb.py -f .\ltr.zip -w
Traceback (most recent call last):
File "C:\Users\Admin\Desktop\Letterboxd-to-IMDb-master\letterboxd2imdb.py", line 6, in
import requests
ModuleNotFoundError: No module named 'requests'

Note: I renamed the letterboxd zip file to ltr.zip

AttributeError: module 'argparse' has no attribute 'BooleanOptionalAction'

Hello, have everything set up and on the latest release of python as of the posted date of this issue, along with the cookies.txt file and running the prereq script as followed in the README steps, but keep getting this AttributeError on the main function, so not sure how or what to do with this.
Below is the error I get everytime I try to run the script

Traceback (most recent call last):
  File "letterboxd2imdb.py", line 248, in <module>
    main()
  File "letterboxd2imdb.py", line 148, in main
    optional.add_argument("-c", dest="clean", action=argparse.BooleanOptionalAction,
AttributeError: module 'argparse' has no attribute 'BooleanOptionalAction'

Hey buddy

Thanks for the video btw. Very helpful.

Trying to use this script. Everything perfect till the CMD pip install -r requirements.txt part where I get the error : 'pip' is not recognized as an internal or external command, operable program or batch file. Don't know what to do next. Would be grateful if you could help.

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.