letterboxd-rss icon indicating copy to clipboard operation
letterboxd-rss copied to clipboard

IndexError for single page watchlist

Open jpribyl opened this issue 2 years ago • 0 comments

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

jpribyl avatar Feb 19 '23 17:02 jpribyl