const novelupdates = new LIGHT_NOVELS.NovelUpdates();
Note: This method is a subclass of the
BaseParser
class. meaning it is available across most categories.
Parameter | Type | Description |
---|---|---|
query | string |
query to search for. (In this case, We're searching for Classrrom of the Elite ) |
novelupdates.search("Clasroom of the Elite").then(data => {
console.log(data);
})
returns a promise which resolves into an array of light novels. ( Promise<ISearch<ILightNovelResult>>
)
output:
{
results: [
{
id: 'youkoso-jitsuryoku-shijou-shugi-no-kyoushitsu-e', // the light novel id
title: 'Youkoso Jitsuryoku Shijou Shugi no Kyoushitsu e',
url: 'https://www-novelupdates-com.translate.goog/series/youkoso-jitsuryoku-shijou-shugi-no-kyoushitsu-e/?_x_tr_sl=ja&_x_tr_tl=en&_x_tr_hl=en-US',
image: 'https://cdn.novelupdates.com/imgmid/series_10266.jpg'
},
{...}
...
]
}
Parameter | Type | Description |
---|---|---|
lightNovelUrl | string |
id or url of the light novel. (light novel id or url can be found in the light novel search results) |
chapterPage (optional) | number |
chapter page number (default: -1 meaning will fetch all chapters) |
novelupdates.fetchLightNovelInfo("youkoso-jitsuryoku-shijou-shugi-no-kyoushitsu-e").then(data => {
console.log(data);
})
returns a promise which resolves into an light novel info object (including the chapters or volumes). (Promise<ILightNovelInfo>
)
output:
{
id: 'youkoso-jitsuryoku-shijou-shugi-no-kyoushitsu-e',
title: 'Youkoso Jitsuryoku Shijou Shugi no Kyoushitsu e',
url: 'https://www.novelupdates.com/series/youkoso-jitsuryoku-shijou-shugi-no-kyoushitsu-e',
image: 'https://cdn.novelupdates.com/images/2017/02/cover00219.jpeg',
author: 'Kinugasa Shougo衣笠彰梧',
genres: [
'Drama',
'Psychological',
'...'
],
rating: 9,
views: NaN,
description: 'Kōdo Ikusei Senior High School, a leading prestigious school with state-of-the-art facilities where nearly...',
status: 'Completed',
chapters: [
{
id: '6659442',
title: 'v17...',
url: 'https://www.novelupdates.com/extnu/6659442'
},
{...}
...
Parameter | Type | Description |
---|---|---|
chapterId | string |
chapter id. (chapter id can be found in the light novel info object) |
readlightnovels.fetchChapterContent("5692421").then(data => {
console.log(data);
})
returns a content object. (Promise<ILightNovelChapterContent>
)
output:
{
text: '\n' +
'It’s a bit sudden,...',
html: '<p></p><p>It’s a bit sudden, but listen seriously to the question I’m about to ask and think about...'
}