* proper hentaifox img url * fix apidocs definitions * add getServer mocks
このコミットが含まれているのは:
コミット
154bb8e199
30
README.md
30
README.md
|
@ -1,5 +1,5 @@
|
|||
<div align="center">
|
||||
<a href="https://janda.mod.land"><img width="500" src="https://cdn.discordapp.com/attachments/1046495201176334467/1055678255866318898/tomoe-janda.png" alt="jandapress"></a>
|
||||
<a href="https://janda.sinkaroid.org"><img width="500" src="https://cdn.discordapp.com/attachments/1046495201176334467/1055678255866318898/tomoe-janda.png" alt="jandapress"></a>
|
||||
|
||||
<h4 align="center">RESTful and experimental API for the doujinboards</h4>
|
||||
<p align="center">
|
||||
|
@ -17,7 +17,7 @@ The motivation of this project is to bring you an actionable data related doujin
|
|||
|
||||
---
|
||||
|
||||
<a href="https://janda.mod.land"><img align="right" src="https://cdn.discordapp.com/attachments/952117487166705747/986315079802814524/tomoe.png" width="300"></a>
|
||||
<a href="https://janda.sinkaroid.org"><img align="right" src="https://cdn.discordapp.com/attachments/952117487166705747/986315079802814524/tomoe.png" width="300"></a>
|
||||
|
||||
- [Jandapress](#)
|
||||
- [The problem](#the-problem)
|
||||
|
@ -196,8 +196,8 @@ The missing piece of nhentai.net - https://sinkaroid.github.io/jandapress/#api-n
|
|||
- <u>sort parameters on search</u>
|
||||
- "popular-today", "popular-week", "popular"
|
||||
- Example
|
||||
- https://janda.mod.land/nhentai/get?book=177013
|
||||
- https://janda.mod.land/nhentai/search?key=futanari&page=2&sort=popular-today
|
||||
- https://janda.sinkaroid.org/nhentai/get?book=177013
|
||||
- https://janda.sinkaroid.org/nhentai/search?key=futanari&page=2&sort=popular-today
|
||||
|
||||
### Pururin
|
||||
The missing piece of pururin.to - https://sinkaroid.github.io/jandapress/#api-pururin
|
||||
|
@ -208,8 +208,8 @@ The missing piece of pururin.to - https://sinkaroid.github.io/jandapress/#api-pu
|
|||
- <u>sort parameters on search</u>
|
||||
- "newest", "most-popular", "highest-rated", "most-viewed", "title", "random"
|
||||
- Example
|
||||
- https://janda.mod.land/pururin/get?book=63373
|
||||
- https://janda.mod.land/pururin/search?key=futanari&page=2&sort=most-viewed
|
||||
- https://janda.sinkaroid.org/pururin/get?book=63373
|
||||
- https://janda.sinkaroid.org/pururin/search?key=futanari&page=2&sort=most-viewed
|
||||
|
||||
### Hentaifox
|
||||
The missing piece of hentaifox.com - https://sinkaroid.github.io/jandapress/#api-hentaifox
|
||||
|
@ -220,8 +220,8 @@ The missing piece of hentaifox.com - https://sinkaroid.github.io/jandapress/#api
|
|||
- <u>sort parameters on search</u>
|
||||
- "latest", "popular"
|
||||
- Example
|
||||
- https://janda.mod.land/hentaifox/get?book=97527
|
||||
- https://janda.mod.land/hentaifox/search?key=milf&page=2&sort=latest
|
||||
- https://janda.sinkaroid.org/hentaifox/get?book=97527
|
||||
- https://janda.sinkaroid.org/hentaifox/search?key=milf&page=2&sort=latest
|
||||
|
||||
### Asmhentai
|
||||
The missing piece of asmhentai.com - https://sinkaroid.github.io/jandapress/#api-asmhentai
|
||||
|
@ -232,8 +232,8 @@ The missing piece of asmhentai.com - https://sinkaroid.github.io/jandapress/#api
|
|||
- <u>sort parameters on search</u>
|
||||
- None
|
||||
- Example
|
||||
- https://janda.mod.land/asmhentai/get?book=416773
|
||||
- https://janda.mod.land/asmhentai/search?key=futanari&page=2
|
||||
- https://janda.sinkaroid.org/asmhentai/get?book=416773
|
||||
- https://janda.sinkaroid.org/asmhentai/search?key=futanari&page=2
|
||||
|
||||
### Hentai2read
|
||||
The missing piece of hentai2read.com - https://sinkaroid.github.io/jandapress/#api-hentai2read
|
||||
|
@ -243,8 +243,8 @@ The missing piece of hentai2read.com - https://sinkaroid.github.io/jandapress/#a
|
|||
- <u>sort parameters on search</u>
|
||||
- TBA
|
||||
- Example
|
||||
- https://janda.mod.land/hentai2read/get?book=butabako_shotaone_matome_fgo_hen/1
|
||||
- https://janda.mod.land/hentai2read/search?key=futanari
|
||||
- https://janda.sinkaroid.org/hentai2read/get?book=butabako_shotaone_matome_fgo_hen/1
|
||||
- https://janda.sinkaroid.org/hentai2read/search?key=futanari
|
||||
|
||||
### Simply-hentai
|
||||
The missing piece of simply-hentai.com - https://sinkaroid.github.io/jandapress/#api-simply-hentai
|
||||
|
@ -253,7 +253,7 @@ The missing piece of simply-hentai.com - https://sinkaroid.github.io/jandapress/
|
|||
- <u>sort parameters on search</u>
|
||||
- TBA
|
||||
- Example
|
||||
- https://janda.mod.land/simply-hentai/get?book=fate-grand-order/fgo-sanbunkatsuhou/all-pages
|
||||
- https://janda.sinkaroid.org/simply-hentai/get?book=fate-grand-order/fgo-sanbunkatsuhou/all-pages
|
||||
|
||||
### 3hentai
|
||||
The missing piece of 3hentai.net - https://sinkaroid.github.io/jandapress/#api-3hentai
|
||||
|
@ -264,8 +264,8 @@ The missing piece of 3hentai.net - https://sinkaroid.github.io/jandapress/#api-3
|
|||
- <u>sort parameters on search</u>
|
||||
- "recent", "popular-24h", "popular-7d", "popular"
|
||||
- Example
|
||||
- https://janda.mod.land/3hentai/get?book=608979
|
||||
- https://janda.mod.land/3hentai/search?key=futanari&page=2&sort=popular-7d
|
||||
- https://janda.sinkaroid.org/3hentai/get?book=608979
|
||||
- https://janda.sinkaroid.org/3hentai/search?key=futanari&page=2&sort=popular-7d
|
||||
|
||||
## Status response
|
||||
`"success": true,` or `"success": false,`
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
},
|
||||
"apidoc": {
|
||||
"title": "Jandapress API Documentation",
|
||||
"url": "https://janda.mod.land",
|
||||
"sampleUrl": "https://janda.mod.land",
|
||||
"url": "https://janda.sinkaroid.org",
|
||||
"sampleUrl": "https://janda.sinkaroid.org",
|
||||
"name": "Jandapress"
|
||||
},
|
||||
"keywords": [],
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import p from "phin";
|
||||
import p, { IResponse } from "phin";
|
||||
import Keyv from "keyv";
|
||||
import { CookieJar } from "tough-cookie";
|
||||
import { HttpsCookieAgent } from "http-cookie-agent/http";
|
||||
|
@ -131,6 +131,16 @@ class JandaPress {
|
|||
heap: `${Math.round(heap * 100) / 100}/${Math.round(heaptotal * 100) / 100} MB`
|
||||
};
|
||||
}
|
||||
|
||||
async getServer(): Promise<string> {
|
||||
const raw = await p({
|
||||
"url": "http://ip-api.com/json",
|
||||
"parse": "json"
|
||||
}) as IResponse;
|
||||
const data = raw.body as unknown as { country: string, regionName: string };
|
||||
return `${data.country}, ${data.regionName}`;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
export default JandaPress;
|
||||
|
|
|
@ -23,19 +23,19 @@ export async function get3hentai(req: Request, res: Response) {
|
|||
* HTTP/1.1 400 Bad Request
|
||||
*
|
||||
* @apiExample {curl} curl
|
||||
* curl -i https://janda.mod.land/3hentai/get?book=123
|
||||
* curl -i https://janda.sinkaroid.org/3hentai/get?book=123
|
||||
*
|
||||
* @apiExample {js} JS/TS
|
||||
* import axios from "axios"
|
||||
*
|
||||
* axios.get("https://janda.mod.land/3hentai/get?book=123")
|
||||
* axios.get("https://janda.sinkaroid.org/3hentai/get?book=123")
|
||||
* .then(res => console.log(res.data))
|
||||
* .catch(err => console.error(err))
|
||||
*
|
||||
* @apiExample {python} Python
|
||||
* import aiohttp
|
||||
* async with aiohttp.ClientSession() as session:
|
||||
* async with session.get("https://janda.mod.land/3hentai/get?book=123") as resp:
|
||||
* async with session.get("https://janda.sinkaroid.org/3hentai/get?book=123") as resp:
|
||||
* print(await resp.json())
|
||||
*/
|
||||
|
||||
|
|
|
@ -17,19 +17,19 @@ export async function random3hentai(req: Request, res: Response) {
|
|||
* HTTP/1.1 400 Bad Request
|
||||
*
|
||||
* @apiExample {curl} curl
|
||||
* curl -i https://janda.mod.land/3hentai/random
|
||||
* curl -i https://janda.sinkaroid.org/3hentai/random
|
||||
*
|
||||
* @apiExample {js} JS/TS
|
||||
* import axios from "axios"
|
||||
*
|
||||
* axios.get("https://janda.mod.land/3hentai/random")
|
||||
* axios.get("https://janda.sinkaroid.org/3hentai/random")
|
||||
* .then(res => console.log(res.data))
|
||||
* .catch(err => console.error(err))
|
||||
*
|
||||
* @apiExample {python} Python
|
||||
* import aiohttp
|
||||
* async with aiohttp.ClientSession() as session:
|
||||
* async with session.get("https://janda.mod.land/3hentai/random") as resp:
|
||||
* async with session.get("https://janda.sinkaroid.org/3hentai/random") as resp:
|
||||
* print(await resp.json())
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -27,20 +27,20 @@ export async function search3hentai(req: Request, res: Response) {
|
|||
* HTTP/1.1 400 Bad Request
|
||||
*
|
||||
* @apiExample {curl} curl
|
||||
* curl -i https://janda.mod.land/3hentai/search?key=yuri
|
||||
* curl -i https://janda.mod.land/3hentai/search?key=yuri&page=2&sort=recent
|
||||
* curl -i https://janda.sinkaroid.org/3hentai/search?key=yuri
|
||||
* curl -i https://janda.sinkaroid.org/3hentai/search?key=yuri&page=2&sort=recent
|
||||
*
|
||||
* @apiExample {js} JS/TS
|
||||
* import axios from "axios"
|
||||
*
|
||||
* axios.get("https://janda.mod.land/3hentai/search?key=yuri")
|
||||
* axios.get("https://janda.sinkaroid.org/3hentai/search?key=yuri")
|
||||
* .then(res => console.log(res.data))
|
||||
* .catch(err => console.error(err))
|
||||
*
|
||||
* @apiExample {python} Python
|
||||
* import aiohttp
|
||||
* async with aiohttp.ClientSession() as session:
|
||||
* async with session.get("https://janda.mod.land/3hentai/search?key=yuri") as resp:
|
||||
* async with session.get("https://janda.sinkaroid.org/3hentai/search?key=yuri") as resp:
|
||||
* print(await resp.json())
|
||||
*/
|
||||
|
||||
|
|
|
@ -23,19 +23,19 @@ export async function getAsmhentai(req: Request, res: Response) {
|
|||
* HTTP/1.1 400 Bad Request
|
||||
*
|
||||
* @apiExample {curl} curl
|
||||
* curl -i https://janda.mod.land/asmhentai/get?book=123
|
||||
* curl -i https://janda.sinkaroid.org/asmhentai/get?book=123
|
||||
*
|
||||
* @apiExample {js} JS/TS
|
||||
* import axios from "axios"
|
||||
*
|
||||
* axios.get("https://janda.mod.land/asmhentai/get?book=123")
|
||||
* axios.get("https://janda.sinkaroid.org/asmhentai/get?book=123")
|
||||
* .then(res => console.log(res.data))
|
||||
* .catch(err => console.error(err))
|
||||
*
|
||||
* @apiExample {python} Python
|
||||
* import aiohttp
|
||||
* async with aiohttp.ClientSession() as session:
|
||||
* async with session.get("https://janda.mod.land/asmhentai/get?book=123") as resp:
|
||||
* async with session.get("https://janda.sinkaroid.org/asmhentai/get?book=123") as resp:
|
||||
* print(await resp.json())
|
||||
*/
|
||||
|
||||
|
|
|
@ -17,19 +17,19 @@ export async function randomAsmhentai(req: Request, res: Response) {
|
|||
* HTTP/1.1 400 Bad Request
|
||||
*
|
||||
* @apiExample {curl} curl
|
||||
* curl -i https://janda.mod.land/asmhentai/random
|
||||
* curl -i https://janda.sinkaroid.org/asmhentai/random
|
||||
*
|
||||
* @apiExample {js} JS/TS
|
||||
* import axios from "axios"
|
||||
*
|
||||
* axios.get("https://janda.mod.land/asmhentai/random")
|
||||
* axios.get("https://janda.sinkaroid.org/asmhentai/random")
|
||||
* .then(res => console.log(res.data))
|
||||
* .catch(err => console.error(err))
|
||||
*
|
||||
* @apiExample {python} Python
|
||||
* import aiohttp
|
||||
* async with aiohttp.ClientSession() as session:
|
||||
* async with session.get("https://janda.mod.land/asmhentai/random") as resp:
|
||||
* async with session.get("https://janda.sinkaroid.org/asmhentai/random") as resp:
|
||||
* print(await resp.json())
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -24,19 +24,19 @@ export async function searchAsmhentai(req: Request, res: Response) {
|
|||
* HTTP/1.1 400 Bad Request
|
||||
*
|
||||
* @apiExample {curl} curl
|
||||
* curl -i https://janda.mod.land/asmhentai/search?key=yuri
|
||||
* curl -i https://janda.sinkaroid.org/asmhentai/search?key=yuri
|
||||
*
|
||||
* @apiExample {js} JS/TS
|
||||
* import axios from "axios"
|
||||
*
|
||||
* axios.get("https://janda.mod.land/asmhentai/search?key=yuri")
|
||||
* axios.get("https://janda.sinkaroid.org/asmhentai/search?key=yuri")
|
||||
* .then(res => console.log(res.data))
|
||||
* .catch(err => console.error(err))
|
||||
*
|
||||
* @apiExample {python} Python
|
||||
* import aiohttp
|
||||
* async with aiohttp.ClientSession() as session:
|
||||
* async with session.get("https://janda.mod.land/asmhentai/search?key=yuri") as resp:
|
||||
* async with session.get("https://janda.sinkaroid.org/asmhentai/search?key=yuri") as resp:
|
||||
* print(await resp.json())
|
||||
*/
|
||||
|
||||
|
|
|
@ -23,19 +23,19 @@ export async function getHentai2read(req: Request, res: Response) {
|
|||
* HTTP/1.1 400 Bad Request
|
||||
*
|
||||
* @apiExample {curl} curl
|
||||
* curl -i https://janda.mod.land/hentai2read/get?book=butabako_shotaone_matome_fgo_hen/1
|
||||
* curl -i https://janda.sinkaroid.org/hentai2read/get?book=butabako_shotaone_matome_fgo_hen/1
|
||||
*
|
||||
* @apiExample {js} JS/TS
|
||||
* import axios from "axios"
|
||||
*
|
||||
* axios.get("https://janda.mod.land/hentai2read/get?book=butabako_shotaone_matome_fgo_hen/1")
|
||||
* axios.get("https://janda.sinkaroid.org/hentai2read/get?book=butabako_shotaone_matome_fgo_hen/1")
|
||||
* .then(res => console.log(res.data))
|
||||
* .catch(err => console.error(err))
|
||||
*
|
||||
* @apiExample {python} Python
|
||||
* import aiohttp
|
||||
* async with aiohttp.ClientSession() as session:
|
||||
* async with session.get("https://janda.mod.land/hentai2read/get?book=butabako_shotaone_matome_fgo_hen/1") as resp:
|
||||
* async with session.get("https://janda.sinkaroid.org/hentai2read/get?book=butabako_shotaone_matome_fgo_hen/1") as resp:
|
||||
* print(await resp.json())
|
||||
*/
|
||||
|
||||
|
|
|
@ -21,19 +21,19 @@ export async function searchHentai2read(req: Request, res: Response) {
|
|||
* HTTP/1.1 400 Bad Request
|
||||
*
|
||||
* @apiExample {curl} curl
|
||||
* curl -i https://janda.mod.land/hentai2read/search?key=yuri
|
||||
* curl -i https://janda.sinkaroid.org/hentai2read/search?key=yuri
|
||||
*
|
||||
* @apiExample {js} JS/TS
|
||||
* import axios from "axios"
|
||||
*
|
||||
* axios.get("https://janda.mod.land/hentai2read/search?key=yuri")
|
||||
* axios.get("https://janda.sinkaroid.org/hentai2read/search?key=yuri")
|
||||
* .then(res => console.log(res.data))
|
||||
* .catch(err => console.error(err))
|
||||
*
|
||||
* @apiExample {python} Python
|
||||
* import aiohttp
|
||||
* async with aiohttp.ClientSession() as session:
|
||||
* async with session.get("https://janda.mod.land/hentai2read/search?key=yuri") as resp:
|
||||
* async with session.get("https://janda.sinkaroid.org/hentai2read/search?key=yuri") as resp:
|
||||
* print(await resp.json())
|
||||
*/
|
||||
|
||||
|
|
|
@ -23,19 +23,19 @@ export async function getHentaifox(req: Request, res: Response) {
|
|||
* HTTP/1.1 400 Bad Request
|
||||
*
|
||||
* @apiExample {curl} curl
|
||||
* curl -i https://janda.mod.land/hentaifox/get?book=123
|
||||
* curl -i https://janda.sinkaroid.org/hentaifox/get?book=123
|
||||
*
|
||||
* @apiExample {js} JS/TS
|
||||
* import axios from "axios"
|
||||
*
|
||||
* axios.get("https://janda.mod.land/hentaifox/get?book=123")
|
||||
* axios.get("https://janda.sinkaroid.org/hentaifox/get?book=123")
|
||||
* .then(res => console.log(res.data))
|
||||
* .catch(err => console.error(err))
|
||||
*
|
||||
* @apiExample {python} Python
|
||||
* import aiohttp
|
||||
* async with aiohttp.ClientSession() as session:
|
||||
* async with session.get("https://janda.mod.land/hentaifox/get?book=123") as resp:
|
||||
* async with session.get("https://janda.sinkaroid.org/hentaifox/get?book=123") as resp:
|
||||
* print(await resp.json())
|
||||
*/
|
||||
|
||||
|
|
|
@ -17,19 +17,19 @@ export async function randomHentaifox(req: Request, res: Response) {
|
|||
* HTTP/1.1 400 Bad Request
|
||||
*
|
||||
* @apiExample {curl} curl
|
||||
* curl -i https://janda.mod.land/hentaifox/random
|
||||
* curl -i https://janda.sinkaroid.org/hentaifox/random
|
||||
*
|
||||
* @apiExample {js} JS/TS
|
||||
* import axios from "axios"
|
||||
*
|
||||
* axios.get("https://janda.mod.land/hentaifox/random")
|
||||
* axios.get("https://janda.sinkaroid.org/hentaifox/random")
|
||||
* .then(res => console.log(res.data))
|
||||
* .catch(err => console.error(err))
|
||||
*
|
||||
* @apiExample {python} Python
|
||||
* import aiohttp
|
||||
* async with aiohttp.ClientSession() as session:
|
||||
* async with session.get("https://janda.mod.land/hentaifox/random") as resp:
|
||||
* async with session.get("https://janda.sinkaroid.org/hentaifox/random") as resp:
|
||||
* print(await resp.json())
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -21,20 +21,20 @@ export async function searchHentaifox(req: Request, res: Response) {
|
|||
* HTTP/1.1 400 Bad Request
|
||||
*
|
||||
* @apiExample {curl} curl
|
||||
* curl -i https://janda.mod.land/hentaifox/search?key=yuri
|
||||
* curl -i https://janda.mod.land/hentaifox/search?key=yuri&page=2&sort=latest
|
||||
* curl -i https://janda.sinkaroid.org/hentaifox/search?key=yuri
|
||||
* curl -i https://janda.sinkaroid.org/hentaifox/search?key=yuri&page=2&sort=latest
|
||||
*
|
||||
* @apiExample {js} JS/TS
|
||||
* import axios from "axios"
|
||||
*
|
||||
* axios.get("https://janda.mod.land/hentaifox/search?key=yuri")
|
||||
* axios.get("https://janda.sinkaroid.org/hentaifox/search?key=yuri")
|
||||
* .then(res => console.log(res.data))
|
||||
* .catch(err => console.error(err))
|
||||
*
|
||||
* @apiExample {python} Python
|
||||
* import aiohttp
|
||||
* async with aiohttp.ClientSession() as session:
|
||||
* async with session.get("https://janda.mod.land/hentaifox/search?key=yuri") as resp:
|
||||
* async with session.get("https://janda.sinkaroid.org/hentaifox/search?key=yuri") as resp:
|
||||
* print(await resp.json())
|
||||
*/
|
||||
|
||||
|
|
|
@ -22,19 +22,19 @@ export async function getNhentai(req: Request, res: Response) {
|
|||
* HTTP/1.1 400 Bad Request
|
||||
*
|
||||
* @apiExample {curl} curl
|
||||
* curl -i https://janda.mod.land/nhentai/get?book=123
|
||||
* curl -i https://janda.sinkaroid.org/nhentai/get?book=123
|
||||
*
|
||||
* @apiExample {js} JS/TS
|
||||
* import axios from "axios"
|
||||
*
|
||||
* axios.get("https://janda.mod.land/nhentai/get?book=123")
|
||||
* axios.get("https://janda.sinkaroid.org/nhentai/get?book=123")
|
||||
* .then(res => console.log(res.data))
|
||||
* .catch(err => console.error(err))
|
||||
*
|
||||
* @apiExample {python} Python
|
||||
* import aiohttp
|
||||
* async with aiohttp.ClientSession() as session:
|
||||
* async with session.get("https://janda.mod.land/nhentai/get?book=123") as resp:
|
||||
* async with session.get("https://janda.sinkaroid.org/nhentai/get?book=123") as resp:
|
||||
* print(await resp.json())
|
||||
*/
|
||||
|
||||
|
|
|
@ -18,19 +18,19 @@ export async function randomNhentai(req: Request, res: Response) {
|
|||
* HTTP/1.1 400 Bad Request
|
||||
*
|
||||
* @apiExample {curl} curl
|
||||
* curl -i https://janda.mod.land/nhentai/random
|
||||
* curl -i https://janda.sinkaroid.org/nhentai/random
|
||||
*
|
||||
* @apiExample {js} JS/TS
|
||||
* import axios from "axios"
|
||||
*
|
||||
* axios.get("https://janda.mod.land/nhentai/random")
|
||||
* axios.get("https://janda.sinkaroid.org/nhentai/random")
|
||||
* .then(res => console.log(res.data))
|
||||
* .catch(err => console.error(err))
|
||||
*
|
||||
* @apiExample {python} Python
|
||||
* import aiohttp
|
||||
* async with aiohttp.ClientSession() as session:
|
||||
* async with session.get("https://janda.mod.land/nhentai/random") as resp:
|
||||
* async with session.get("https://janda.sinkaroid.org/nhentai/random") as resp:
|
||||
* print(await resp.json())
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -22,19 +22,19 @@ export async function relatedNhentai(req: Request, res: Response) {
|
|||
* HTTP/1.1 400 Bad Request
|
||||
*
|
||||
* @apiExample {curl} curl
|
||||
* curl -i https://janda.mod.land/nhentai/related?book=123
|
||||
* curl -i https://janda.sinkaroid.org/nhentai/related?book=123
|
||||
*
|
||||
* @apiExample {js} JS/TS
|
||||
* import axios from "axios"
|
||||
*
|
||||
* axios.get("https://janda.mod.land/nhentai/related?book=123")
|
||||
* axios.get("https://janda.sinkaroid.org/nhentai/related?book=123")
|
||||
* .then(res => console.log(res.data))
|
||||
* .catch(err => console.error(err))
|
||||
*
|
||||
* @apiExample {python} Python
|
||||
* import aiohttp
|
||||
* async with aiohttp.ClientSession() as session:
|
||||
* async with session.get("https://janda.mod.land/nhentai/related?book=123") as resp:
|
||||
* async with session.get("https://janda.sinkaroid.org/nhentai/related?book=123") as resp:
|
||||
* print(await resp.json())
|
||||
*/
|
||||
|
||||
|
|
|
@ -26,20 +26,20 @@ export async function searchNhentai(req: Request, res: Response) {
|
|||
* HTTP/1.1 400 Bad Request
|
||||
*
|
||||
* @apiExample {curl} curl
|
||||
* curl -i https://janda.mod.land/nhentai/search?key=yuri
|
||||
* curl -i https://janda.mod.land/nhentai/search?key=yuri&page=2&sort=popular-today
|
||||
* curl -i https://janda.sinkaroid.org/nhentai/search?key=yuri
|
||||
* curl -i https://janda.sinkaroid.org/nhentai/search?key=yuri&page=2&sort=popular-today
|
||||
*
|
||||
* @apiExample {js} JS/TS
|
||||
* import axios from "axios"
|
||||
*
|
||||
* axios.get("https://janda.mod.land/nhentai/search?key=yuri")
|
||||
* axios.get("https://janda.sinkaroid.org/nhentai/search?key=yuri")
|
||||
* .then(res => console.log(res.data))
|
||||
* .catch(err => console.error(err))
|
||||
*
|
||||
* @apiExample {python} Python
|
||||
* import aiohttp
|
||||
* async with aiohttp.ClientSession() as session:
|
||||
* async with session.get("https://janda.mod.land/nhentai/search?key=yuri") as resp:
|
||||
* async with session.get("https://janda.sinkaroid.org/nhentai/search?key=yuri") as resp:
|
||||
* print(await resp.json())
|
||||
*/
|
||||
|
||||
|
|
|
@ -23,19 +23,19 @@ export async function getPururin(req: Request, res: Response) {
|
|||
* HTTP/1.1 400 Bad Request
|
||||
*
|
||||
* @apiExample {curl} curl
|
||||
* curl -i https://janda.mod.land/pururin/get?book=123
|
||||
* curl -i https://janda.sinkaroid.org/pururin/get?book=123
|
||||
*
|
||||
* @apiExample {js} JS/TS
|
||||
* import axios from "axios"
|
||||
*
|
||||
* axios.get("https://janda.mod.land/pururin/get?book=123")
|
||||
* axios.get("https://janda.sinkaroid.org/pururin/get?book=123")
|
||||
* .then(res => console.log(res.data))
|
||||
* .catch(err => console.error(err))
|
||||
*
|
||||
* @apiExample {python} Python
|
||||
* import aiohttp
|
||||
* async with aiohttp.ClientSession() as session:
|
||||
* async with session.get("https://janda.mod.land/pururin/get?book=123") as resp:
|
||||
* async with session.get("https://janda.sinkaroid.org/pururin/get?book=123") as resp:
|
||||
* print(await resp.json())
|
||||
*/
|
||||
|
||||
|
|
|
@ -19,19 +19,19 @@ export async function randomPururin(req: Request, res: Response) {
|
|||
* HTTP/1.1 400 Bad Request
|
||||
*
|
||||
* @apiExample {curl} curl
|
||||
* curl -i https://janda.mod.land/pururin/random
|
||||
* curl -i https://janda.sinkaroid.org/pururin/random
|
||||
*
|
||||
* @apiExample {js} JS/TS
|
||||
* import axios from "axios"
|
||||
*
|
||||
* axios.get("https://janda.mod.land/pururin/random")
|
||||
* axios.get("https://janda.sinkaroid.org/pururin/random")
|
||||
* .then(res => console.log(res.data))
|
||||
* .catch(err => console.error(err))
|
||||
*
|
||||
* @apiExample {python} Python
|
||||
* import aiohttp
|
||||
* async with aiohttp.ClientSession() as session:
|
||||
* async with session.get("https://janda.mod.land/pururin/random") as resp:
|
||||
* async with session.get("https://janda.sinkaroid.org/pururin/random") as resp:
|
||||
* print(await resp.json())
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -27,20 +27,20 @@ export async function searchPururin(req: Request, res: Response) {
|
|||
* HTTP/1.1 400 Bad Request
|
||||
*
|
||||
* @apiExample {curl} curl
|
||||
* curl -i https://janda.mod.land/pururin/search?key=yuri
|
||||
* curl -i https://janda.mod.land/pururin/search?key=yuri&page=2&sort=newest
|
||||
* curl -i https://janda.sinkaroid.org/pururin/search?key=yuri
|
||||
* curl -i https://janda.sinkaroid.org/pururin/search?key=yuri&page=2&sort=newest
|
||||
*
|
||||
* @apiExample {js} JS/TS
|
||||
* import axios from "axios"
|
||||
*
|
||||
* axios.get("https://janda.mod.land/pururin/search?key=yuri")
|
||||
* axios.get("https://janda.sinkaroid.org/pururin/search?key=yuri")
|
||||
* .then(res => console.log(res.data))
|
||||
* .catch(err => console.error(err))
|
||||
*
|
||||
* @apiExample {python} Python
|
||||
* import aiohttp
|
||||
* async with aiohttp.ClientSession() as session:
|
||||
* async with session.get("https://janda.mod.land/pururin/search?key=yuri") as resp:
|
||||
* async with session.get("https://janda.sinkaroid.org/pururin/search?key=yuri") as resp:
|
||||
* print(await resp.json())
|
||||
*/
|
||||
|
||||
|
|
|
@ -25,19 +25,19 @@ export async function getSimplyhentai(req: Request, res: Response) {
|
|||
* HTTP/1.1 400 Bad Request
|
||||
*
|
||||
* @apiExample {curl} curl
|
||||
* curl -i https://janda.mod.land/simply-hentai/get?book=fate-grand-order/fgo-sanbunkatsuhou/all-pages
|
||||
* curl -i https://janda.sinkaroid.org/simply-hentai/get?book=fate-grand-order/fgo-sanbunkatsuhou/all-pages
|
||||
*
|
||||
* @apiExample {js} JS/TS
|
||||
* import axios from "axios"
|
||||
*
|
||||
* axios.get("https://janda.mod.land/simply-hentai/get?book=fate-grand-order/fgo-sanbunkatsuhou/all-pages")
|
||||
* axios.get("https://janda.sinkaroid.org/simply-hentai/get?book=fate-grand-order/fgo-sanbunkatsuhou/all-pages")
|
||||
* .then(res => console.log(res.data))
|
||||
* .catch(err => console.error(err))
|
||||
*
|
||||
* @apiExample {python} Python
|
||||
* import aiohttp
|
||||
* async with aiohttp.ClientSession() as session:
|
||||
* async with session.get("https://janda.mod.land/simply-hentai/get?book=fate-grand-order/fgo-sanbunkatsuhou/all-pages") as resp:
|
||||
* async with session.get("https://janda.sinkaroid.org/simply-hentai/get?book=fate-grand-order/fgo-sanbunkatsuhou/all-pages") as resp:
|
||||
* print(await resp.json())
|
||||
*/
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ const janda = new JandaPress();
|
|||
const app = express();
|
||||
|
||||
|
||||
app.get("/", slow, limiter, (req, res) => {
|
||||
app.get("/", slow, limiter, async (req, res) => {
|
||||
res.send({
|
||||
success: true,
|
||||
message: "Hi, I'm alive!",
|
||||
|
@ -20,6 +20,7 @@ app.get("/", slow, limiter, (req, res) => {
|
|||
date: new Date().toLocaleString(),
|
||||
rss: janda.currentProccess().rss,
|
||||
heap: janda.currentProccess().heap,
|
||||
server: await janda.getServer(),
|
||||
version: `${pkg.version}`,
|
||||
});
|
||||
logger.info({
|
||||
|
|
|
@ -24,8 +24,7 @@ export async function scrapeContent(url: string) {
|
|||
}).get();
|
||||
|
||||
const imgSrc = $("img").map((i, el) => $(el).attr("data-src")).get();
|
||||
const parameterImg = imgSrc[0].split("/").slice(5).join("/");
|
||||
const parameterImg2 = parameterImg.split("/").slice(0, -1).join("/");
|
||||
const parameterImg2 = imgSrc[0].split("/").slice(0, 5).join("/");
|
||||
const extensionImg = `.${imgSrc[0].split(".").slice(-1)[0]}`;
|
||||
const info = $("span.i_text.pages").map((i, abc) => {
|
||||
return $(abc).text();
|
||||
|
|
読み込み中…
新しいイシューから参照