Models
Novel
- class novelsave_sources.Novel(title: str, url: str, author: Optional[str] = None, synopsis: List[str] = <factory>, thumbnail_url: Optional[str] = None, status: Optional[str] = None, lang: str = 'en', volumes: List[novelsave_sources.models.volume.Volume] = <factory>, metadata: List[novelsave_sources.models.metadata.Metadata] = <factory>)[source]
Data class for parsed novels
- title
The name of the novel.
- Type
str
- url
The url pointing to the webpage of novel.
- Type
str
- author
The author of the novel.
- Type
Optional[str]
- synopsis
The description of the novel in lines or paragraphs.
- Type
List[str]
- thumbnail_url
The url pointing to the thumbnail image of the novel
- Type
Optional[str]
- status
The status of the novel, can be ongoing, completed, or hiatus
- Type
Optional[str]
- lang
The language of the novel. This is not the original language, however the language this novel is currently readable in.
- Type
str
Volume
- class novelsave_sources.Volume(index: int, name: str, chapters: List[novelsave_sources.models.chapter.Chapter] = <factory>)[source]
Data class that identifies a single volume in a novel
- index
The order of volume in the novel. Lowest first.
- Type
int
- name
The name of the volume.
- Type
str
- add(chapter: novelsave_sources.models.chapter.Chapter)[source]
Shorthand method to add chapter into this volume
Chapter
- class novelsave_sources.Chapter(index: int = - 1, title: Optional[str] = None, paragraphs: Optional[str] = None, url: Optional[str] = None, updated: Optional[datetime.datetime] = None)[source]
Data class that identifies a single chapter in a novel
- index
The order of chapter in the novel. Lowest first.
- Type
int
- title
The title of the chapter.
- Type
str
- paragraphs
The reading content of the chapter in html.
- Type
Optional[str]
- url
The url pointing to the chapter in the web.
- Type
str
- updated
The time this chapter was last updated as defined by the source.
- Type
str
Metadata
- class novelsave_sources.Metadata(name: str, value: str, others: Optional[dict] = None)[source]
Data class that holds a single value of metadata for novels
- name
Name of the metadata
Example:
subject,tag- Type
str
- value
Value of the metadata
- Type
str
- others
A dictionary value defining other attributes of the metadata
- Type
dict
- namespace
The namespace of the metadata. This is either Dublin Core (DC) or OPF.
Dublin Core (DC) has the following tags:
title,language,subject,creator,contributor,publisher,rights,coverage,date,descriptionThe
__init__()method automatically identifies the namespace.- Type
str