Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib_letterboxd.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def get_movies_from_path(self, watch_item: WatchListItem, global_filters: Letter
soup = BeautifulSoup(response.content, 'html.parser')

# Find movie posters/links
movie_items = soup.find_all('div', attrs={'data-component-class': 'globals.comps.LazyPoster'})
movie_items = soup.find_all('div', attrs={'data-component-class': 'LazyPoster'})

if not movie_items:
self.logger.debug(f"No more movies found on page {page} of {watch_item.path}")
Expand All @@ -178,7 +178,8 @@ def get_movies_from_path(self, watch_item: WatchListItem, global_filters: Letter
self.logger.info(f"Found {len(movies)} movies in {watch_item.path}")

# Save to cache
self._save_to_cache(cache_file_path, movies)
if len(movies) > 0:
self._save_to_cache(cache_file_path, movies)

return movies

Expand Down
Loading