npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ksk-metadata

v2.0.1

Published

README.md # KSK-Metadata Scraper ## SCRAPE THE METADATA FROM KSK.MOE

Downloads

6

Readme

KSK-Metadata Scraper

SCRAPE THE METADATA FROM KSK.MOE

Use this KSK-Metadata Scraper to scrape the metadata from the ksk.moe

Install

npm i ksk-metadata

USAGE

Returns an object containing all the metadata info

If you're using ES6 module:

import ksk from "ksk-metadata";

const kskRes = (await ksk('https://ksk.moe/view/1234/asdfasdfasdf'))
console.log(kskRes)
//do something with the result 

console.log(JSON.stringify(kskRes)) //jsonify the output obj to jsonObj

/*____________________OR_____________________*/
let urlArr = [
    'https://ksk.moe/view/1234/asdfasdfasdf',
   'https://ksk.moe/view/1234/asdfasdfasdf',
]


const kskRes = (await ksk(urlArr, 3000)) //second param is Rate Limit in ms, change it to your liking

CommonJS example:

const ksk = require('ksk-metadata');

test();
async function test() {
    const kskRes = (await ksk('https://ksk.moe/view/1234/asdfasdfasdf'))
    //do something with res
    console.log(kskRes)
    //jsonify
    console.log(JSON.stringify(kskRes)) 
}


/* Or you can do this */

const ksk = require('ksk-metadata');


(async () => {
    const kskRes = (await ksk('https://ksk.moe/view/1234/asdfasdfasdf'))
    //do something with res
    console.log(kskRes)

})();

//For Multiple of URL

const kskRes = (await ksk(['https://ksk.moe/view/1234/asdfasdfasdf','https://ksk.moe/view/1234/asdfasdfasdf'], 3000)) //second param is Rate Limit in ms, change it to your liking

Changes v2 -> v1

- Works with new updated ksk website
- Updated to new KSK Website Layout
- Object now returns all the metadata info fro ksk gallery
- Dates are now returned as Unix Time
- Thumbnail details itself is returned as an object
- Updated demo-code
- updated example output to new format

Example Output

{
  "sucess": true,
  "title": "KSK Manga Title",
  "full_title": "[Artist] Title [Publiser]",
  "thumbnail": {
    "url": "https://ksk-thumbnail.xyz/t/12345/abcdef/789/Artist-Title-Pubisher.png",
    "title": "Cover for KSK Manga Title",
    "alt": "Cover for KSK Manga Title"
  },
  "category": "Doujinshi",
  "authors": [
    "[Artist Name]"
  ],
  "parody": "Original Work",
  "page": "49 Pages",
  "original_size": "81 MiB",
  "resampled_size": "20 MiB",
  "tags": [
    "Tag 1",
    "Tag 2",
    "Tag 3",
    "Tag 4"
  ],
  "publisher": "Publisher Name",
  "links": [
    {
      "label": "ksk.moe",
      "url": "https://ksk.moe/view/1234/asdfasdfasdf"
    },
    {
      "label": "Publisher",
      "url": "https://ksk.moe/out/asdfghjklfghjklrtyuio=="
    }
  ],
  "circle": [
    "Artist Circle"
  ],
  "magazine":"Magazine Name 2023-05",
  "uploaded_date": "1682973355",
  "archived_date": "1683376679",
  "published_date": "1683429632",
  "updated_date": "1683431315"
}

Old ksk outputs

{
    "sucess": true,
    "title": "KSK Manga Title",
    "full_title": "[Artist] Title",
    "thumbnail": "https://ksk-thumbnail.url/896.webp",
    "authors": [
      { "name": "name", "role": "Artist" }
    ],
    "tags": [
      "Tag 1",
      "Tag 2",
      "Tag 3",
      "Tag 4",
    ],
    "publisher": "Publisher Name",
    "links": [
      {
        "label": "'ksk.moe'",
        "url": "https://ksk.moe/archive/12345/some-url"
      }
    ],
    "created_date": "2022-12-30T17:00:00.000Z",
    "published_date": "2023-03-19T16:55:01.000Z"
  }