A letterboxd webscraper
Project description
letterboxdpy
Installation
pip install letterboxdpy
** User Objects **
from letterboxdpy import user
nick = user.User("nmcassa")
print(nick.jsonify())
output:
{
"username": "nmcassa",
"favorites": [
"The Grand Budapest Hotel",
"The King of Comedy",
"The Alpinist",
"The Graduate"
],
"stats": {
"Films": "360",
"This year": "86",
"List": "1",
"Following": "7",
"Followers": "6"
},
"watchlist_length": "73"
}
** user_genre_info(user object) **
nick = user.User("nmcassa")
print(user_genre_info(nick))
output:
{'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 **
returns the first page of the users following / followers
** user_films_watched(user object) **
returns all of the users watched movies
** Movie Object **
from letterboxdpy import movie
king = movie.Movie("king kong")
print(king.jsonify())
king = movie.Movie("king kong", 2005)
print(king.jsonify())
output:
{
"title": "king-kong",
"director": [
"Merian C. Cooper",
"Ernest B. Schoedsack"
],
"rating": "3.85 out of 5",
"year": "1933",
"genres": [
"horror",
"adventure",
"fantasy"
]
}
{
"title": "king-kong-2005",
"director": "Peter Jackson",
"rating": "3.33 out of 5",
"year": "2005",
"genres": [
"action",
"adventure",
"drama"
]
}
** movie_details(movie object) **
king = movie.Movie("king kong", 2005)
print(movie_details(king))
output:
{'Country': ['New Zealand', 'USA', 'Germany'], 'Studio': ['Universal Pictures', 'WingNut Films', 'Big Primate Pictures', 'MFPV Film'], 'Language': ['English']}
** movie_description(movie object) **
returns the description of the movie passed
** List Object **
from letterboxdpy import list
list = list.List("https://letterboxd.com/nmcassa/list/movies-for-sale-and-my-local-goodwill/")
print(list.jsonify())
output:
{
"title": "Movies for sale and my local goodwill",
"author": "nmcassa",
"description": "",
"movies": [
"Fiddler on the Roof",
"Grumpier Old Men",
"The Rainmaker",
"Great Expectations",
"Heat",
"The Santa Clause",
"The Lord of the Rings: The Fellowship of the Ring",
"Charlie's Angels",
"The Chamber",
"Easy A",
"A Christmas Carol",
"A Christmas Story",
"The Return of Jafar",
"Snow Dogs",
"101 Dalmatians",
"Dumbo",
"Annie",
"Spy Kids",
"The Lion King",
"The Jungle Book",
"Saving Private Ryan",
"The Princess Diaries",
"Aladdin and the King of Thieves",
"Lady and the Tramp II: Scamp's Adventure",
"Knocked Up",
"Ocean's Eleven",
"Evan Almighty",
"Iron Man",
"Crazy, Stupid, Love.",
"Ender's Game",
"Rambo",
"Talladega Nights: The Ballad of Ricky Bobby",
"National Lampoon's Christmas Vacation",
"Mission: Impossible",
"Mission: Impossible II",
"Quantum of Solace",
"The Devil Wears Prada",
"Green Zone",
"Inside Job",
"Racing Stripes",
"No Strings Attached",
"We Bought a Zoo",
"Madagascar",
"Happy Feet",
"A Cinderella Story"
],
"filmCount": 45
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
letterboxdpy-2.2.tar.gz
(1.0 MB
view hashes)
Built Distribution
Close
Hashes for letterboxdpy-2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8ff9b9fad47ec05ab90ae6760c2d5775082fd72bf9f40e31bf9cc6ad496e460 |
|
MD5 | 0dcf87195c027da36ee84947319223d3 |
|
BLAKE2b-256 | f8c0f3b95df08a3fd7c0f343fe67422d2b2f1bfa1bc3381d2bccffd4c723494a |