Skip to content

Errors

PyNyaaError

Bases: Exception

Base exception for all pynyaa errors.

ParsingError

Bases: PyNyaaError

Raised when there is an error parsing the HTML.

TorrentNotFoundError

TorrentNotFoundError(url: str)

Bases: PyNyaaError

Raised when the requested torrent page cannot be found on Nyaa.

Source code in src/pynyaa/_errors.py
def __init__(self, url: str):
    super().__init__(
        f"Torrent not found at {url!r}\nIt may have been removed, never existed, or the ID/URL is incorrect."
    )