Skip to content

Fix for bug with 2 page pagination #57

@nitelite

Description

@nitelite

This line doesn't seem to work on albums with 2 pages. It picks up the "next page" link with a chevron in it for the last page and crashes since its not a number.

last_page = int(pagination.find_all('a')[-2].text)

Suggested fix:

        page_links = [a for a in pagination.find_all('a') if a.text.isdigit()]
        last_page = int(page_links[-1].text) if page_links else current_page

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions