1.0.9 • Published 5 years ago
fictionpress-scraper v1.0.9
fictionpress-scraper
A promise based scraper for Fictionpress stories.
Installation
npm install fictionpress-scraper --save
Usage
const fpScraper = require("fictionpress-scraper");
fpScraper
.getStory(storyID)
.then(function(story) {
console.log(story);
})
.catch(function(error) {
console.log(error);
});
The following properties are available on the returned story
object:
{
"id": Number,
"title": String,
"author": {
"id": Number,
"name": String
},
"summary": String,
"noOfChapters": Number,
"content": []
}
story.content
is an array filled with chapter
objects with the
following structure:
{
"id": Number,
"title": String,
"data": String
}
License
The MIT License (MIT)