lboxd
An unofficial letterboxd.com API
Get reviews from letterboxd users. Done with pure HTML parsing.
Development Environment
-
Ubuntu 20.04 lts
-
Python 3.8.5
This has not been tested on Windows, there may be encoding problems.
Installation
pip install lboxd
Usage
'''
Pretty printing reviews with a generator.
=> Generators are good for when there are requests to many different URLs.
=> A new requests session is created for the duration of the generator.
'''
import lboxd
from bs4 import BeautifulSoup as bs
from rich import print as rprint
for review in lboxd.reviews(user='redlettermedia', count=5):
title = review ['title']
review = review['review']
htmlPretty = bs.prettify(bs(review, 'html.parser'))
rprint(f'[yellow]Title:[/yellow] [red]{title}[/red]\n{htmlPretty}')
from lboxd import lboxdlist
from rich import print as rprint
for movie in lboxdlist(user='daqoon'):
title = movie ['title']
rating = movie['rating']
richTitle = f'[yellow]Title:[/yellow] [red]{title}[/red]'
if rating:
rprint(f'{richTitle} rating={rating}')
else:
rprint(richTitle)
CLI
Example
Arguments
--user USER -u USER letterboxd.com user
--reviews -r Gets reviews
--testing -t Testing flag - for development only
--save-html -w Saves an HTML document for easily viewing reviews
--browser-open -b Opens saved HTML document in the browser
--search SEARCH [SEARCH ...] -s SEARCH [SEARCH ...] Will only get search terms, currently needs to match exactly with letterboxd notation. Replace spaces with dashes.
Metadata
Release files for lboxd 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lboxd-1.2.1.tar.gz | 5.6 kB | Without provenance | Details for lboxd-1.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lboxd-1.2.1-py3-none-any.whl | Python 3 | none | any | Details for lboxd-1.2.1-py3-none-any.whl |
Total release size: 12.2 kB
Release files / lboxd-1.2.1.tar.gz
| Download URL | lboxd-1.2.1.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60aac19b80d5bb68547053ebc1596c7fdc2de8918003c0890a12b0e3272c5194
|
|
BLAKE2b-256 checksum How to use checksums |
2de952e1c72b08380e84f6d30957edb4f9d2cd438e4027d66eeea3067a0706a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.10 CPython/3.8.5 Linux/5.4.0-58-generic
|
Release files / lboxd-1.2.1-py3-none-any.whl
| Download URL | lboxd-1.2.1-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ce7ddaa139f07a6d309f2632e8dde22e5907d34e20e54a5bf2a24a710db30687
|
|
BLAKE2b-256 checksum How to use checksums |
38bd926ae6d550ea6d25d1b98b25ab4f0a4dc1c424c9bcfdc7b0cd23f043d93e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.10 CPython/3.8.5 Linux/5.4.0-58-generic
|
Security for lboxd 1.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.