Watchlist Guide
letterboxdpy provides two complementary approaches to access a user's watchlist: the dedicated lightweight Watchlist class, and the filtered UserWatchlist page handler.
Standalone Watchlist Class
The simplest way to inspect a member's saved watchlist:
from letterboxdpy.watchlist import Watchlist
watchlist = Watchlist("bugracoskun")
print(f"Username: {watchlist.username}")
print(f"Total Films: {watchlist.count}")
# .movies is lazily evaluated on first access
for movie_id, film in list(watchlist.movies.items())[:5]:
print(f"- {film['name']} ({film['year']}) -> {film['url']}")
Sample Watchlist Payload Structure (Mock Demonstration)
{
"username": "bugracoskun",
"url": "https://letterboxd.com/bugracoskun/watchlist/",
"count": 150,
"movies": {
"51557": {
"slug": "constantine",
"name": "Constantine",
"year": 2005,
"url": "https://letterboxd.com/film/constantine/"
},
"35903": {
"slug": "time",
"name": "Time",
"year": 2006,
"url": "https://letterboxd.com/film/time/"
},
"...": "..."
}
}
Advanced Filtered Watchlists
When you need to filter a user's watchlist by genre, decade, release year, or streaming provider, use the pages.watchlist handler on a User instance:
Example Filtered Watchlist Output
API Reference
For detailed class definitions, see: - Watchlist API Reference - User API Reference