Skip to content

Novel Class Methods

John Erinjery edited this page Apr 15, 2023 · 2 revisions

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

from neosekai_api import Novel

novel = Novel('https://www.neosekaitranslations.com/novel/oresuki/')

url = novel.url     # the url of the novel ie, https://www.neosekaitranslations.com/novel/oresuki/

noveltags = novel.novel_tags

'''
novel_tags returns a dictionary that contains metadata about the novel. In this example noveltags will be

{
    'title': 'Ore wo Suki nano wa Omae dake ka yo',
    'rating': ' Average  5 / 5 out of 7',
    'rank': '70th, it has 8K views',
    'alternative_titles': ['俺を好きなのはお前だけかよ'],
    'authors': ['Rakuda'],
    'genre': ['Comedy', 'Drama', 'Harem', 'Romance', 'School Life', 'Slice of Life'],
    'tags': ['TL: Iyo'],
    'release': '2016',
    'status': 'Ongoing'
}
'''

It also offers several methods that can be used to work with neosekai novels:

from neosekai_api import Novel

novel = Novel('https://www.neosekaitranslations.com/novel/oresuki/')

synopsis = novel.get_synopsis(fancy=True)     # returns the synopsis of the chapter as shown in the Novel hompage

index_page = novel.get_index_page()      # returns the index page of the novel, as explained below
  • in the method get_synopsis, fancy is an optional argument. if set to False, all 'fancy' punctuation marks like : ‘’ ´ “ ” – - ― will be replaced with regular punctuation marks. It is set to True by default.

  • the method get_index_page returns the chapter list in JSON format. The format of JSON is explained below.

      {
          "1" : {
              "volume" : "Volume 1",
              "chapter_name" : "Illustrations",
              "url" : "https://www.neosekaitranslations.com/novel/oresuki/volume-1/illustrations/",
              "release_date" : "February 15, 2023"
          },

          "2" : {"..."}
      }

Clone this wiki locally