Skip to content

NovelChapter Class Methods

John Erinjery edited this page Apr 14, 2023 · 1 revision

The NovelChapter class offers the methods and functions as shown by example:

from neosekai_api import NovelChapter

chapter = NovelChapter('https://www.neosekaitranslations.com/novel/oresuki/volume-1/chapter-3-part-3/')

url = chapter.url    # Url of the chapter homepage ie, https://www.neosekaitranslations.com/novel/oresuki/volume-1/chapter-3-part-3/
volume = chapter.volume    # Volume of the given chapter
name = chapter.name   # Name of the chapter
release_date = chapter.release_date     # The release date of the given chapter

NovelChapter class provides the given methods:

from neosekai_api import NovelChapter

chapter = NovelChapter('https://www.neosekaitranslations.com/novel/oresuki/volume-1/chapter-3-part-3/')

chapter_details = chapter.chapter_details()
content = chapter.get_chapter_content(fancy=True)
  • the method chapter_details returns chapter volume, name, url, release_date, in the given order with the given keywords as a dictionary.
  • the method get_chapter_content returns main chapter content in JSON format. Each key-value pair in the JSON returned corresponds to a paragraph in the chapter. The JSON format is given below.
  • The optional fancy keyword is the same as explained before in the previous page.
{
    "1" : {
        "type" : "...", "content" : "..."
    },

   "2" : {"..."}
}
  • type can have a value of text for textual content
  • type can have a value of img if the content is an image. link to the image will be provided in content

Clone this wiki locally