letterboxd-rss
letterboxd-rss copied to clipboard
IndexError for single page watchlist
Found a total of 1 movies
Traceback (most recent call last):
File "/home/j/.pyenv/versions/letterboxd-rss/bin/letterboxd-rss", line 5, in <module>
from letterboxd_rss.__main__ import main
File "/home/j/.pyenv/versions/letterboxd-rss/lib/python3.10/site-packages/letterboxd_rss/__main__.py", line 32, in <module>
main(sys.argv[1:])
File "/home/j/.pyenv/versions/letterboxd-rss/lib/python3.10/site-packages/letterboxd_rss/__main__.py", line 29, in main
process(args)
File "/home/j/.pyenv/versions/letterboxd-rss/lib/python3.10/site-packages/letterboxd_rss/__init__.py", line 48, in process
last_page = soup.find_all("li", attrs={"class": "paginate-page"})[-1].text
IndexError: list index out of range
PR submitted here: https://github.com/janw/letterboxd-rss/pull/4
If you are open to it, I think it would be relatively easy to add a pytest
suite to this library + I can submit a PR for that separately