Fetch Chapter By Symbolic Link

Fetches details of a manga chapter including pages and images by its symbolic link, facilitating efficient data loading.

  • Parameters:

    • chapter: The manga chapter to fetch, which must include a valid symbolic link.

  • Returns: A Chapter object containing the fetched chapter details.

  • Raises:

    • SourceWasNotDefined if no source has been set before calling this method.

    • InvalidResource if the provided chapter does not have a valid symbolic link.

# Example to fetch a chapter by its symbolic link
symbolic_link = SymbolicLink(link="http://example.com/chapter/1")
chapter = Chapter(id="1", pages=[], link=symbolic_link)

try:
    detailed_chapter = enma.fetch_chapter_by_symbolic_link(chapter=chapter)
    print(f"Fetched {len(detailed_chapter.pages)} pages.")
except InvalidResource:
    print("Error: Invalid chapter link.")

Last updated