ghomasHudson / Jellyfin-Auto-Collections

Automatically make jellyfin collections from IMDB, Letterboxd lists and more.
MIT License
102 stars 12 forks source link

Letterboxd list throws AttributeError: 'NoneType' object has no attribute 'find_all' #40

Closed c64bob closed 5 months ago

c64bob commented 5 months ago

Everything is working for other letterboxd lists, but this one is throwing an error:

2024-06-23 12:03:27.178 | INFO | main::43 - Starting up 2024-06-23 12:03:27.178 | INFO | main::44 - Starting initial run 2024-06-23 12:03:27.480 | INFO | main:main:29 - 2024-06-23 12:03:27.480 | INFO | main:main:30 - 2024-06-23 12:03:27.480 | INFO | main:main:31 - Getting list info for plugin: letterboxd, list id: cassidyminarik/list/david-ehrlichs-top-25-films-of-2022 Page number: 1 Traceback (most recent call last): File "main.py", line 45, in main(config) File "main.py", line 32, in main list_info = plugins[plugin_name].get_list(list_id, config['plugins'][plugin_name]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "plugins/letterboxd.py", line 28, in get_list description = soup.find('div', {'class': 'body-text'}).find_all('p') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'find_all'

ghomasHudson commented 5 months ago

This was caused by lists where there is no description. I've updated the script to handle this now.