Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nekopoi-scraper

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nekopoi-scraper - npm Package Compare versions

Comparing version 2.6.9 to 2.7.0

.github/dependabot.yml

44

dist/@types/index.d.ts

@@ -1,34 +0,14 @@

/**
* Get recent hentai
* @return {Promise<Object>}
*/
export declare const latest: () => Promise<object>;
/**
* Get all list ** by type.
* @param {String} _type (optional), eg. "jav" or "hentai", default "hentai".
* @param {Number} page (optional), eg. 2, default 1.
* @return {Promise<Object>}
*/
export declare const list: (_type?: string, page?: number) => Promise<object>;
/**
* get hentai by query.
* @param {String} query
* @param {Number} limit (optional), for number of output, eg. 10
* @return {Promise<Object>}
*/
export declare const search: (query: string, limit?: number) => Promise<object>;
/**
* get hentai detail by id
* @param {Number} id
* @return {Promise<Object>}
*/
export declare const detail: (id: number) => Promise<object>;
declare const kucingPoi: {
search: (query: string, limit?: number) => Promise<object>;
latest: () => Promise<object>;
list: (_type?: string, page?: number) => Promise<object>;
detail: (id: number) => Promise<object>;
import { ResultDetail, ResultList, ResultRecent, ResultSearch, errorHandling } from "./Types";
declare const latest: () => Promise<ResultRecent[] | errorHandling>;
declare const list: (_type?: string, page?: number) => Promise<ResultList[] | errorHandling>;
declare const search: (query: string, limit?: number) => Promise<ResultSearch[] | errorHandling>;
declare const detail: (id: number) => Promise<ResultDetail | errorHandling>;
export { search, latest, list, detail, };
declare const _default: {
search: (query: string, limit?: number | undefined) => Promise<errorHandling | ResultSearch[]>;
latest: () => Promise<errorHandling | ResultRecent[]>;
list: (_type?: string | undefined, page?: number | undefined) => Promise<errorHandling | ResultList[]>;
detail: (id: number) => Promise<errorHandling | ResultDetail>;
};
export default kucingPoi;
/** Hello :) */
export default _default;
//# sourceMappingURL=index.d.ts.map

@@ -1,34 +0,13 @@

/**
* Get recent hentai
* @return {Promise<Object>}
*/
export declare const latest: () => Promise<object>;
/**
* Get all list ** by type.
* @param {String} _type (optional), eg. "jav" or "hentai", default "hentai".
* @param {Number} page (optional), eg. 2, default 1.
* @return {Promise<Object>}
*/
export declare const list: (_type?: string, page?: number) => Promise<object>;
/**
* get hentai by query.
* @param {String} query
* @param {Number} limit (optional), for number of output, eg. 10
* @return {Promise<Object>}
*/
export declare const search: (query: string, limit?: number) => Promise<object>;
/**
* get hentai detail by id
* @param {Number} id
* @return {Promise<Object>}
*/
export declare const detail: (id: number) => Promise<object>;
declare const kucingPoi: {
search: (query: string, limit?: number) => Promise<object>;
latest: () => Promise<object>;
list: (_type?: string, page?: number) => Promise<object>;
detail: (id: number) => Promise<object>;
import { ResultDetail, ResultList, ResultRecent, ResultSearch, errorHandling } from "./Types";
declare const latest: () => Promise<ResultRecent[] | errorHandling>;
declare const list: (_type?: string, page?: number) => Promise<ResultList[] | errorHandling>;
declare const search: (query: string, limit?: number) => Promise<ResultSearch[] | errorHandling>;
declare const detail: (id: number) => Promise<ResultDetail | errorHandling>;
export { search, latest, list, detail, };
declare const _default: {
search: (query: string, limit?: number | undefined) => Promise<errorHandling | ResultSearch[]>;
latest: () => Promise<errorHandling | ResultRecent[]>;
list: (_type?: string | undefined, page?: number | undefined) => Promise<errorHandling | ResultList[]>;
detail: (id: number) => Promise<errorHandling | ResultDetail>;
};
export default kucingPoi;
/** Hello :) */
//# sourceMappingURL=index.d.ts.map
export default _default;

@@ -6,21 +6,10 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.detail = exports.search = exports.list = exports.latest = void 0;
/**
* @author FrierenDv
* @version 2.6.9
*
* Don't forget to star the repo :)
* @link (https://github.com/xct007/nekopoi-scraper)
*/
exports.detail = exports.list = exports.latest = exports.search = void 0;
const axios_1 = __importDefault(require("axios"));
const index_js_1 = require("./Config/index.js");
/**
* Get recent hentai
* @return {Promise<Object>}
*/
const Constant_js_1 = require("./Constant.js");
const latest = async () => {
let result = [];
const data = await axios_1.default
.get(index_js_1.URL_RECENT, {
...index_js_1.Config,
.get(Constant_js_1.URL_RECENT, {
...Constant_js_1.axiosConfig,
})

@@ -45,13 +34,7 @@ .catch((e) => e === null || e === void 0 ? void 0 : e.response);

exports.latest = latest;
/**
* Get all list ** by type.
* @param {String} _type (optional), eg. "jav" or "hentai", default "hentai".
* @param {Number} page (optional), eg. 2, default 1.
* @return {Promise<Object>}
*/
const list = async (_type, page) => {
let result = [];
const data = await axios_1.default
.get((0, index_js_1.URL_LIST)(_type ? _type : "hentai", page ? page : 1), {
...index_js_1.Config,
.get((0, Constant_js_1.URL_LIST)(_type ? _type : "hentai", page ? page : 1), {
...Constant_js_1.axiosConfig,
})

@@ -75,13 +58,7 @@ .catch((e) => e === null || e === void 0 ? void 0 : e.response);

exports.list = list;
/**
* get hentai by query.
* @param {String} query
* @param {Number} limit (optional), for number of output, eg. 10
* @return {Promise<Object>}
*/
const search = async (query, limit) => {
let result = [];
const data = await axios_1.default
.get((0, index_js_1.URL_SEARCH)(query), {
...index_js_1.Config,
.get((0, Constant_js_1.URL_SEARCH)(query), {
...Constant_js_1.axiosConfig,
})

@@ -106,16 +83,11 @@ .catch((e) => e === null || e === void 0 ? void 0 : e.response);

exports.search = search;
/**
* get hentai detail by id
* @param {Number} id
* @return {Promise<Object>}
*/
const detail = async (id) => {
let result;
let data = await axios_1.default
.get((0, index_js_1.URL_SERIES)(id), {
...index_js_1.Config,
.get((0, Constant_js_1.URL_SERIES)(id), {
...Constant_js_1.axiosConfig,
})
.catch((e) => e === null || e === void 0 ? void 0 : e.response);
if (data.data && data.data.episode) {
const temp = data.data;
let temp = data.data;
if (temp.info_meta.genre && temp.info_meta.genre.length) {

@@ -135,10 +107,7 @@ let _temp = [];

data = await axios_1.default
.get((0, index_js_1.URL_POST)(id), {
...index_js_1.Config,
.get((0, Constant_js_1.URL_POST)(id), {
...Constant_js_1.axiosConfig,
})
.catch((e) => {
return e.response;
});
.catch((e) => e === null || e === void 0 ? void 0 : e.response);
if (data.data && Array.isArray(data.data.stream)) {
/** remove some unused <Object> */
delete data.data["content"];

@@ -159,10 +128,7 @@ delete data.data["slug"];

exports.detail = detail;
const kucingPoi = {
search: exports.search,
latest: exports.latest,
list: exports.list,
detail: exports.detail,
exports.default = {
search,
latest,
list,
detail,
};
exports.default = kucingPoi;
/** Hello :) */
//# sourceMappingURL=index.js.map

@@ -1,34 +0,13 @@

/**
* Get recent hentai
* @return {Promise<Object>}
*/
export declare const latest: () => Promise<object>;
/**
* Get all list ** by type.
* @param {String} _type (optional), eg. "jav" or "hentai", default "hentai".
* @param {Number} page (optional), eg. 2, default 1.
* @return {Promise<Object>}
*/
export declare const list: (_type?: string, page?: number) => Promise<object>;
/**
* get hentai by query.
* @param {String} query
* @param {Number} limit (optional), for number of output, eg. 10
* @return {Promise<Object>}
*/
export declare const search: (query: string, limit?: number) => Promise<object>;
/**
* get hentai detail by id
* @param {Number} id
* @return {Promise<Object>}
*/
export declare const detail: (id: number) => Promise<object>;
declare const kucingPoi: {
search: (query: string, limit?: number) => Promise<object>;
latest: () => Promise<object>;
list: (_type?: string, page?: number) => Promise<object>;
detail: (id: number) => Promise<object>;
import { ResultDetail, ResultList, ResultRecent, ResultSearch, errorHandling } from "./Types";
declare const latest: () => Promise<ResultRecent[] | errorHandling>;
declare const list: (_type?: string, page?: number) => Promise<ResultList[] | errorHandling>;
declare const search: (query: string, limit?: number) => Promise<ResultSearch[] | errorHandling>;
declare const detail: (id: number) => Promise<ResultDetail | errorHandling>;
export { search, latest, list, detail, };
declare const _default: {
search: (query: string, limit?: number | undefined) => Promise<errorHandling | ResultSearch[]>;
latest: () => Promise<errorHandling | ResultRecent[]>;
list: (_type?: string | undefined, page?: number | undefined) => Promise<errorHandling | ResultList[]>;
detail: (id: number) => Promise<errorHandling | ResultDetail>;
};
export default kucingPoi;
/** Hello :) */
//# sourceMappingURL=index.d.ts.map
export default _default;

@@ -1,19 +0,8 @@

/**
* @author FrierenDv
* @version 2.6.9
*
* Don't forget to star the repo :)
* @link (https://github.com/xct007/nekopoi-scraper)
*/
import axios from "axios";
import { Config, URL_RECENT, URL_LIST, URL_SEARCH, URL_POST, URL_SERIES, } from "./Config/index.js";
/**
* Get recent hentai
* @return {Promise<Object>}
*/
export const latest = async () => {
import { axiosConfig, URL_RECENT, URL_LIST, URL_SEARCH, URL_POST, URL_SERIES, } from "./Constant.js";
const latest = async () => {
let result = [];
const data = await axios
.get(URL_RECENT, {
...Config,
...axiosConfig,
})

@@ -37,13 +26,7 @@ .catch((e) => e === null || e === void 0 ? void 0 : e.response);

};
/**
* Get all list ** by type.
* @param {String} _type (optional), eg. "jav" or "hentai", default "hentai".
* @param {Number} page (optional), eg. 2, default 1.
* @return {Promise<Object>}
*/
export const list = async (_type, page) => {
const list = async (_type, page) => {
let result = [];
const data = await axios
.get(URL_LIST(_type ? _type : "hentai", page ? page : 1), {
...Config,
...axiosConfig,
})

@@ -66,13 +49,7 @@ .catch((e) => e === null || e === void 0 ? void 0 : e.response);

};
/**
* get hentai by query.
* @param {String} query
* @param {Number} limit (optional), for number of output, eg. 10
* @return {Promise<Object>}
*/
export const search = async (query, limit) => {
const search = async (query, limit) => {
let result = [];
const data = await axios
.get(URL_SEARCH(query), {
...Config,
...axiosConfig,
})

@@ -96,16 +73,11 @@ .catch((e) => e === null || e === void 0 ? void 0 : e.response);

};
/**
* get hentai detail by id
* @param {Number} id
* @return {Promise<Object>}
*/
export const detail = async (id) => {
const detail = async (id) => {
let result;
let data = await axios
.get(URL_SERIES(id), {
...Config,
...axiosConfig,
})
.catch((e) => e === null || e === void 0 ? void 0 : e.response);
if (data.data && data.data.episode) {
const temp = data.data;
let temp = data.data;
if (temp.info_meta.genre && temp.info_meta.genre.length) {

@@ -126,9 +98,6 @@ let _temp = [];

.get(URL_POST(id), {
...Config,
...axiosConfig,
})
.catch((e) => {
return e.response;
});
.catch((e) => e === null || e === void 0 ? void 0 : e.response);
if (data.data && Array.isArray(data.data.stream)) {
/** remove some unused <Object> */
delete data.data["content"];

@@ -148,3 +117,4 @@ delete data.data["slug"];

};
const kucingPoi = {
export { search, latest, list, detail, };
export default {
search,

@@ -155,4 +125,1 @@ latest,

};
export default kucingPoi;
/** Hello :) */
//# sourceMappingURL=index.js.map
{
"name": "nekopoi-scraper",
"version": "2.6.9",
"version": "2.7.0",
"description": "Simple nekopoi scraper",

@@ -42,3 +42,3 @@ "exports": {

"devDependencies": {
"rimraf": "^3.0.2",
"rimraf": "^4.1.2",
"ts-node": "^10.9.1",

@@ -45,0 +45,0 @@ "typescript": "^4.9.4"

@@ -19,7 +19,5 @@ <a name="readme-top"></a>

## Note:
`Dont forget to star the repo :)`
### How To Use
## How To Use
## Basic
### Basic

@@ -45,3 +43,3 @@ 1. Install Packages

## Example
### Example

@@ -208,2 +206,18 @@ <details><summary><b>Search hentai by query</b></summary>

<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

@@ -210,0 +224,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc