Giter Site home page Giter Site logo

mroy-25 / jandapress Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sinkaroid/jandapress

1.0 0.0 1.0 230 KB

RESTful and experimental API for nhentai and other doujinshi

Home Page: https://sinkaroid.github.io/jandapress

License: MIT License

TypeScript 99.80% Dockerfile 0.20%

jandapress's Introduction

jandapress

RESTful and experimental API for the doujinboards

Jandapress was named JCE (Janda Cheerio Express) and definitely depends on them.
The motivation of this project is to bring you an actionable data related doujin with gather in mind.

PlaygroundContributingReport Issues


The problem

You enjoy consume doujin sites to build web applications. There are a lot sites that have effort especially pururin, simply-hentai and etc, not official api available nor public resource that can be used for everyone. Instead making lot of abstraction and enumerating them manually, You can rely on jandapress to make less of pain. The current state is FREE to use, meant all anonymous usage is allowed no aunthentication required and CORS was enabled.

The solution

Features

  • Gather the most doujin sites
  • Objects taken that are consistent structure, almost
  • Objects taken is re-appended to make extendable
  • All in one: get, search, and random methods
  • In the future we may implement JWT authentication
  • Pure scraping, except nh sigh..

Jandapress vs. the whole doujin sites

Features availability that Jandapress has

Site Status Get Search Random
nhentai Nhentai
pururin Pururin
hentaifox Hentaifox
hentai2read Hentai2read
simply-hentai Simply-hentai
asmhentai Asmhentai
3hentai Asmhentai

Prerequisites

NOTE: NodeJS 14.x or higher

To handle several requests from each web, You will also need Redis for persistent caching, free tier is available on Redis Labs, You can also choose another provider as we using keyv Key-value storage with support for multiple backends. All data must be stored in <Buffer> here.

Installation

Rename .env.schema to .env and fill the value with your own.

PORT=3000 ## default port
REDIS_URL=redis://default:somenicepassword@someredishost:1337 ## the database url
EXPIRE_CACHE=1 ## a hour

Docker

docker pull ghcr.io/sinkaroid/jandapress:latest
docker run -p 3000:3000 -d ghcr.io/sinkaroid/jandapress:latest

Manual

git clone https://github.com/sinkaroid/jandapress.git

  • Install dependencies
    • npm install / yarn install
  • Jandapress production
    • npm run build
    • npm run start:prod
  • Jandapress testings
    • npm run start:dev

Running tests

Jandapress depends on

  • express web api framework
  • keyv key-value storage with support for multiple backends
  • cheerio for parsing html
  • cors middleware for enabling CORS
  • rate-limit rate-limiting middleware for express

Start the production server

npm run start:prod

Running development server

npm run start:dev

Check the whole sites, It's available for scraping or not

npm run test

Check nhentai It's under cloudflare protection or not

npm run test:cf

Generating playground like swagger from apidoc definition

npm run build:apidoc

To running other tests, you can see object scripts in file package.json

Playground

https://sinkaroid.github.io/jandapress

  • These parameter?: means is optional

  • / : index page

Nhentai

The missing piece of nhentai.net - https://sinkaroid.github.io/jandapress/#api-nhentai

Pururin

The missing piece of pururin.to - https://sinkaroid.github.io/jandapress/#api-pururin

Hentaifox

The missing piece of hentaifox.com - https://sinkaroid.github.io/jandapress/#api-hentaifox

Asmhentai

The missing piece of asmhentai.com - https://sinkaroid.github.io/jandapress/#api-asmhentai

Hentai2read

The missing piece of hentai2read.com - https://sinkaroid.github.io/jandapress/#api-hentai2read

Simply-hentai

The missing piece of simply-hentai.com - https://sinkaroid.github.io/jandapress/#api-simply-hentai

3hentai

The missing piece of 3hentai.net - https://sinkaroid.github.io/jandapress/#api-3hentai

Status response

HTTP/1.1 200 OK
HTTP/1.1 200 (cached)
HTTP/1.1 500 (bad parameters)

Limitations

Nhentai was cloudflare protection enabled, If IP and our thoughts against them? You should implement a proxy. Check cookie branch, take a look this workaround Zekfad/nhentai-api/issues/25#issuecomment-1141360074

Frequently asked questions

Q: The website response is slow

That's unfortunate, This repository was opensource already, You can host and deploy Jandapress with your own instance. Any fixes and improvements will updating to this repo.

Q: I dont want to host my own instance

That's unfortunate, Hit the "Sponsor this project" button, any kind of donations will helps me to funding the development.

Pronunciation

id_ID/jan·da/ — Dewasa dan mengikat; (?)

Client libraries / Wrappers

Seamlessly integrate with the languages you love, simplified the usage, and intelisense definitions on your IDEs

Legal

This tool can be freely copied, modified, altered, distributed without any attribution whatsoever. However, if you feel like this tool deserves an attribution, mention it. It won't hurt anybody.

Licence: WTF.

jandapress's People

Contributors

sinkaroid avatar mroy-25 avatar soujiokita avatar

Stargazers

 avatar

Forkers

amoskaredd

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.