Skip to main content

A letterboxd webscraper

Project description

letterboxdpy

PyPI version Downloads format

Installation

pip install letterboxdpy

User Objects

from letterboxdpy import user
nick = user.User("nmcassa")
print(nick)
{
    "username": "nmcassa",
    "watchlist_length": "72",
    "favorites": [
        [
            "The Grand Budapest Hotel",
            "/film/the-grand-budapest-hotel/"
        ],
        [
            "The King of Comedy",
            "/film/the-king-of-comedy/"
        ],
        [
            "The Alpinist",
            "/film/the-alpinist/"
        ],
        [
            "The Graduate",
            "/film/the-graduate/"
        ]
    ],
    "stats": {
        "Films": "372",
        "This year": "97",
        "List": "1",
        "Following": "7",
        "Followers": "6"
    }
}

user_genre_info(user object)

from letterboxdpy import user
nick = user.User("nmcassa")
print(user.user_genre_info(nick))
{'action': 55, 'adventure': 101, 'animation': 95, 'comedy': 188, 'crime': 22, 'documentary': 16, 'drama': 94, 'family': 109, 'fantasy': 54, 'history': 5, 'horror': 27, 'music': 9, 'mystery': 30, 'romance': 29, 'science-fiction': 48, 'thriller': 43, 'tv-movie': 13, 'war': 4, 'western': 5}

user_following(user object) / user_followers(user object)

from letterboxdpy import user
nick = user.User("nmcassa")
print(user.user_following(nick))
print(user.user_followers(nick))
['ryanshubert', 'Sean Baker', '24framesofnick', 'ConnorEatsPants', 'IHE', 'karsten', 'jordynhf']
['ryanshubert', 'Crescendo House', 'Brendonyu668', 'Parker Bobbitt', 'jordynhf', 'Dan']

user_films_watched(user object)

from letterboxdpy import user
nick = user.User("nmcassa")
print(user.user_films_watched(nick))
...all of the users watched movies in a tuple formatted (movie title, movie url)...

user_reviews(user object)

from letterboxdpy import user
nick = user.User("nmcassa")
print(user.user_reviews(nick))
[{'movie': 'Beast', 'rating': ' ★½ ', 'date': '23 Aug 2022', 'review': 'Did not like it'}, {'movie': 'Men', 'rating': ' ★ ', 'date': '25 May 2022', 'review': 'What could he possibly be trying to say with this'}, {'movie': 'Nightcrawler', 'rating': ' ★★★ ', 'date': '04 May 2022', 'review': 'Jake is a pussy nerd loser in this'}, {'movie': 'The Graduate', 'rating': ' ★★★★ ', 'date': '30 Jan 2022', 'review': 'If only they didn’t play the same song like 20 times'}, {'movie': "I'm Thinking of Ending Things", 'rating': ' ★★★★ ', 'date': '14 Feb 2021', 'review': 'yeah i dont get it'}]

Movie Object

from letterboxdpy import movie
king = Movie("king kong")
print(king)
king = Movie("king kong", 2005)
print(king)
house = Movie("/film/the-house-2022-1/")
print(house)
{
    "title": "king-kong",
    "url": "https://letterboxd.com/film/king-kong/",
    "directors": [
        "Merian C. Cooper",
        "Ernest B. Schoedsack"
    ],
    "rating": "3.85 out of 5",
    "year": "1933",
    "genres": [
        "horror",
        "adventure",
        "fantasy"
    ]
}
{
    "title": "king-kong-2005",
    "url": "https://letterboxd.com/film/king-kong-2005/",
    "director": "Peter Jackson",
    "rating": "3.33 out of 5",
    "year": "2005",
    "genres": [
        "action",
        "adventure",
        "drama"
    ]
}
{
    "url": "https://letterboxd.com/film/the-house-2022-1/",
    "directors": [
        "Paloma Baeza",
        "Niki Lindroth von Bahr",
        "Emma De Swaef",
        "Marc James Roels"
    ],
    "rating": "3.54 out of 5",
    "year": "2022",
    "genres": [
        "fantasy",
        "horror",
        "drama",
        "comedy",
        "animation"
    ]
}

movie_details(movie object)

from letterboxdpy import movie
king = movie.Movie("king kong", 2005)
print(movie.movie_details(king))
{'Country': ['New Zealand', 'USA', 'Germany'], 'Studio': ['Universal Pictures', 'WingNut Films', 'Big Primate Pictures', 'MFPV Film'], 'Language': ['English']}

movie_description(movie object)

from letterboxdpy import movie
king = movie.Movie("king kong", 2005)
print(movie.movie_description(king))
In 1933 New York, an overly ambitious movie producer coerces his cast and hired ship crew to travel to mysterious Skull Island, where they encounter Kong, a giant ape who is immediately smitten with...

movie_popular_reviews(movie object)

from letterboxdpy import movie
king = movie.Movie("king kong" 2005)
print(movie.movie_popular_reviews(king))
[{'reviewer': 'BRAT', 'rating': ' ★★★½ ', 'review': 'naomi watts: bitch, it’s king kongking kong: yes, i’m king kongadrien brody: this is king kong?jack black: yes, miss king kong!!kyle chandler: and i’m kyle chandler :)'}, {'reviewer': 'josh lewis', 'rating': ' ★★★★ ', 'review': 'This review may contain spoilers. I can handle the truth.'}, {'reviewer': 'ashley 🥀', 'rating': ' ★½ ', 'review': 'To quote one of the funniest tweets I have ever seen: did King Kong really think he was gonna date that lady?'}, ...

List Object

from letterboxdpy import list
list = list.List("Horrorville", "The Official Top 25 Horror Films of 2022")
print(list)
{
    "title": "the-official-top-25-horror-films-of-2022",
    "author": "horrorville",
    "url": "https://letterboxd.com/horrorville/list/the-official-top-25-horror-films-of-2022/",
    "description": "To be updated monthly. It's ranked by average Letterboxd member rating. See the official top 50 of 2021 on Horrroville here. Eligibility rules: \u2022\u00a0Feature-length narrative films included only. \u2022\u00a0Shorts, documentaries, and TV are excluded. \u2022\u00a0Films must have their festival premiere in 2022 or their first national release in any country in 2022. \u2022\u00a0Films must have the horror genre tag on TMDb and Letterboxd. \u2022\u00a0There is a 1,000 minimum view threshold. Curated by Letterboxd Head of Platform Content Jack Moulton.",
    "filmCount": 25,
    "movies": [
        [
            "Nope",
            "/film/nope/"
        ],
        [
            "Pearl",
            "/film/pearl-2022/"
        ],
        [
            "Barbarian",
            "/film/barbarian-2022/"
        ],
        [
            "Mad God",
            "/film/mad-god/"
        ],
        [
            "Bones and All",
            "/film/bones-and-all/"
        ],
        [
            "Prey",
            "/film/prey-2022/"
        ],
        [
            "Bodies Bodies Bodies",
            "/film/bodies-bodies-bodies/"
        ],
        [
            "You Won't Be Alone",
            "/film/you-wont-be-alone/"
        ],
        [
            "X",
            "/film/x-2022/"
        ],
        [
            "The House",
            "/film/the-house-2022-1/"
        ],
        [
            "Fresh",
            "/film/fresh-2022/"
        ],
        [
            "Final Cut",
            "/film/final-cut-2022/"
        ],
        [
            "Saloum",
            "/film/saloum/"
        ],
        [
            "Bhoothakaalam",
            "/film/bhoothakaalam/"
        ],
        [
            "The Black Phone",
            "/film/the-black-phone/"
        ],
        [
            "Nanny",
            "/film/nanny-2022/"
        ],
        [
            "15 Ways to Kill Your Neighbour",
            "/film/15-ways-to-kill-your-neighbour/"
        ],
        [
            "Resurrection",
            "/film/resurrection-2022/"
        ],
        [
            "Watcher",
            "/film/watcher/"
        ],
        [
            "Scream",
            "/film/scream-2022/"
        ],
        [
            "Crimes of the Future",
            "/film/crimes-of-the-future-2022/"
        ],
        [
            "Speak No Evil",
            "/film/speak-no-evil-2022/"
        ],
        [
            "Flux Gourmet",
            "/film/flux-gourmet/"
        ],
        [
            "Satan's Slaves 2: Communion",
            "/film/satans-slaves-2-communion/"
        ],
        [
            "Medusa",
            "/film/medusa-2021/"
        ]
    ]
}

list_tags(list object)

from letterboxdpy import list
a = list.List("Horrorville", "The Official Top 25 Horror Films of 2022")
print(list.list_tags(a))
['official', 'horror', 'letterboxd official', 'letterboxd', '2022', 'topprofile', 'top 25']

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

letterboxdpy-3.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

letterboxdpy-3.1-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file letterboxdpy-3.1.tar.gz.

File metadata

  • Download URL: letterboxdpy-3.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.6

File hashes

Hashes for letterboxdpy-3.1.tar.gz
Algorithm Hash digest
SHA256 57b8992f07cf6353e5a0b5021c09fe0fb65dea7a00b2e8c2277cb6b513d2343e
MD5 0249fbd3989a34af1da11bea1c6ad71c
BLAKE2b-256 5146b11e7998d86c5e017148343c7e62542b1089653ba504dd830b6fa9e5c040

See more details on using hashes here.

File details

Details for the file letterboxdpy-3.1-py3-none-any.whl.

File metadata

  • Download URL: letterboxdpy-3.1-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.6

File hashes

Hashes for letterboxdpy-3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4fe60a54bc99fa7e2b14ac99aa118c09a3ce3406efcdaa3d6b92a4a80392d95f
MD5 11ad200a89de575d28350ce6b3f5b611
BLAKE2b-256 970ba80b2696162e20b51deedee25432cf2fd749605c59ed86e35e193809ff2c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page