-
Notifications
You must be signed in to change notification settings - Fork 0
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 chapterNovelChapter 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_detailsreturns chaptervolume,name,url,release_date, in the given order with the given keywords as a dictionary. - the method
get_chapter_contentreturns 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
fancykeyword is the same as explained before in the previous page.
{
"1" : {
"type" : "...", "content" : "..."
},
"2" : {"..."}
}-
typecan have a value oftextfor textual content -
typecan have a value ofimgif the content is an image. link to the image will be provided incontent