letterboxdpy icon indicating copy to clipboard operation
letterboxdpy copied to clipboard

`user.diary` runtime information returns empty

Open fastfingertips opened this issue 6 months ago • 2 comments

The runtime field in user.diary entries is returning null or empty values. This is likely due to changes in Letterboxd's HTML structure.

Expected behavior: runtime field should contain the movie's runtime duration.

fastfingertips avatar Aug 29 '25 14:08 fastfingertips

in letterboxdpy/pages/user_diary,py

it try to get the runtime from the dom

runtime = actions.get("data-film-run-time") or actions.get("data-film-runtime")

but the value of the runtime is no longer in the dom

we can either delete the runtime key from the response object or we can make an additional request to /film/{movie_name}/json to get a object like this and get the runtime (in minutes):

{
  "result": true,
  "csrf": "9d409c5b8fa926063918",
  "lid": "2b8y",
  "uid": "film:51947",
  "type": "film",
  "typeName": "film",
  "id": 51947,
  "name": "Taxi Driver",
  "image125": "/film/taxi-driver/image-125/",
  "image150": "/film/taxi-driver/image-150/",
  "releaseYear": 1976,
  "runTime": 114,
  "slug": "taxi-driver",
  "url": "/film/taxi-driver/",
  "originalName": null,
  "filmlistAction": "/ajax/film:51947/filmlistentry",
  "watchlistAction": "/film/taxi-driver/add-to-watchlist/",
  "directors": [
    {
      "name": "Martin Scorsese"
    }
  ]
}

S1NJED avatar Sep 02 '25 02:09 S1NJED

It looks like we will make the runtime optional.

fastfingertips avatar Sep 03 '25 08:09 fastfingertips