API Reference: Scraper
letterboxdpy.core.scraper.Scraper
A class for scraping and parsing web pages.
get_page(url)
classmethod
Fetch, check, and parse the HTML content from the specified URL.
_fetch(url)
classmethod
Fetch the HTML content from the specified URL using a session with robust retry logic.
letterboxdpy.utils.utils_url.normalize_letterboxd_url(url)
Normalizes Letterboxd URLs to ensure canonical trailing slashes. Prevents Cloudflare WAF challenges and redundant 301/302 redirects. Preserves query parameters, fragments, and avoids file extensions.
letterboxdpy.utils.utils_url.get_page_url(base_url, page, params='')
Generate a paginated URL from a base URL and page number. Ensures no double slashes and consistent trailing slashes.
Note
Letterboxd accepts both '/page/1/' and the clean root URL '/', but canonical pagination links on Letterboxd point to the root path for page 1, while page 2+ follow '/page/{N}/'.