# neko-scraper

> Simple nekopoi wrapper/scraper

Latest version **1.7.1** (published 2023-08-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install neko-scraper
pnpm add neko-scraper
yarn add neko-scraper
bun add neko-scraper
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.7.1 |
| Published | 2023-08-11 |
| First published | 2023-08-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 26.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | ArifzynXD |
| Maintainers | arifzyn |
| Keywords | nekopoi, lightweight, scraper, api, hentong |

## Links

- npm: https://www.npmjs.com/package/neko-scraper
- Repository: https://github.com/ArifzynXD/nekopoi-scrapper
- Issues: https://github.com/ArifzynXD/nekopoi-scrapper/issues
- npm.io page: https://npm.io/package/neko-scraper

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^1.1.3

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.7.1 (latest) — 2023-08-11

## README

<a name="readme-top"></a>
<br />

<h3 align="center">Simple</h3>
<div align="center">
  <a href="#">
    <img src="https://static.zerochan.net/Frieren.full.3233127.jpg" alt="Logo">
  </a>

<h3 align="center">NekoPoi Scraper API</h3>
<img alt="npm" src="https://img.shields.io/npm/dw/nekopoi-scraper">
<img alt="NPM" src="https://img.shields.io/npm/l/nekopoi-scraper">

<a href="https://visitorbadge.io/status?path=https%3A%2F%2Fgithub.com%2FArifzynXD%2Fnekopoi-scraper"></a>
<img src="https://api.visitorbadge.io/api/visitors?path=https%3A%2F%2Fgithub.com%2FArifzynXD%2Fnekopoi-scraper&countColor=%232ccce4&style=flat" />
<img alt="CodeFactor Grade" src="https://img.shields.io/codefactor/grade/github/ArifzynXD/nekopoi-scraper/main">
</div>

## How To Use

### Basic

1. Install Packages
   ```sh
   yarn add nekopoi-scraper
   ```
   or using test build
   ```sh
   yarn add github:ArifzynXD/nekopoi-scraper
   ```
2. Import packages

- `CommonJS`
  ```js
  const { search, latest, list, detail } = require("nekopoi-scraper");
  ```
- `ESM`
  ```ts
  import { search, latest, list, detail } from "nekopoi-scraper";
  ```

### Example

<details><summary><b>Search hentai by query</b></summary>
    
```js
import { search } from "nekopoi-scraper";

const query = "love";
const limit = 10; // (optional) limit output. default 10

search(query, limit).then((data) => {
  console.log(data);
});

````
Output
```js
  [
    {
      "id": Number,
      "date": String,
      "title":String,
      "image": String,
      "type": String,
    },
    ...
  ]
````

</details>

<details><summary><b>Get latest hentai</b></summary>

```js
import { latest } from "nekopoi-scraper";

latest().then((data) => {
  console.log(data);
});
```

- Output

```js
[
  {
    id: Number,
    title: String,
    image: String,
    description: String,
  },
  ...
];
```

</details>

<details><summary><b>Get hentai detail by id</b></summary>

```js
import { detail } from "nekopoi-scraper";

detail(21910).then((data) => {
  console.log(data);
});
```

- Output

```js
  {
    "id": Number,
    "date": String,
    "title": String,
    "description": String,
    "image": String,
    "info_meta": {
      "aliases": String,
      "episode": String,
      "status": String,
      "tayang": String,
      "produser": String,
      "genre": String,
      "durasi": String,
      "skor": String,
    },
    "episode": [
      {
        "id": Number,
        "date": String,
        "title": String,
        "image": String,
      },
      ...
    ]
  }
```

- Output if **id** is episode

```js
  {
    "id":Number,
    "title": String,
    "image": String,
    "series": {
      "id": Number,
      "title": String,
      "content": String,
      "image": String,
      "genre": String,
    }
    "stream": [
      {
        "link": String
      },
      ...
    ],
    "download": [
      {
        "type": String,
        "links": [
           "name": String,
           "link": String
        ]
      },
      ...
    ],
  }
```

</details>

<details><summary><b>Get List all hentai</b></summary>

```js
import { list } from "nekopoi-scraper";

const type = "jav"; // available "jav", "hentai"
const page = 1; // optional
list(type, page).then((data) => {
  console.log(data);
});
```

- Output

```js
  [
    {
      "id": Number,
      "date": String,
      "title": String,
      "image": String,
      "type":String,
    }
    ...
  ]
```

</details>

<details><summary><b>Error handling</b></summary>

```js
import { search } from "nekopoi-scraper";

const data = await search("milf", 15);
if (data.error) {
  console.log(data.message);
} else {
  console.log(data)
}

```

</details>

## Contributing

If have a suggestion that whould make this better, please fork and create a pull request. You can also simply open an issue. Don't forget to give the repo a star!
```
1. Fork the repo
2. Commit your Changes
3. Push to the Branch
4. Open a Pull Request
```
<p align="right">(<a href="#readme-top">back to top</a>)</p>

---
_Source: https://npm.io/package/neko-scraper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
