A promise based scraper for Fictionpress stories.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.babelrc
.eslintrc.json
.gitignore
LICENSE.md
README.md
package.json
yarn.lock

README.md

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)