https://github.com/eeriemyxi/firush
Find random nHentai manga/doujinshi/comic based on specified search query.
https://github.com/eeriemyxi/firush
c docker nhentai python scraping tui web
Last synced: 2 months ago
JSON representation
Find random nHentai manga/doujinshi/comic based on specified search query.
- Host: GitHub
- URL: https://github.com/eeriemyxi/firush
- Owner: eeriemyxi
- License: mit
- Created: 2025-03-14T13:45:03.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-05T14:12:39.000Z (12 months ago)
- Last Synced: 2025-09-01T01:26:46.951Z (10 months ago)
- Topics: c, docker, nhentai, python, scraping, tui, web
- Language: C
- Homepage: https://firush-eeriemyxi.p.psf.lt/
- Size: 43.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Firush
Firush can help you find random manga/doujinshi/comics from [nHentai](https://nhentai.net/) based on search query.
The idea is to,
- Search the query
- Scrape the total page count _k_
- Pick a random number between 1 and _k_
- Scrape and return a random entry from that page.
Firush can be installed via (requires installation of Git):
```
pip install git+https://github.com/eeriemyxi/firush
```
> [!CAUTION]
> [Wheels](https://pythonwheels.com/) are currently unavailable. You will need a C compiler to install Firush. Wheels and Pypi upload is in the TODO list.
> [!CAUTION]
> Windows is not supported yet (but is planned). See [Technical Details](#technical-details) for more information.
> [!IMPORTANT]
> Firush needs the user to have [curl](https://github.com/curl/curl) (tested on v8.12.1) installed with TLS (tested with [OpenSSL](https://github.com/openssl/openssl)) support.
Firush provides a web client via `firush web` command:

Firush also provides a TUI client via `firush tui` command:

> [!NOTE]
> You may also use Docker to use Firush, via `docker compose run firush firush --help`. But the TUI client won't be able to open your web browser (without some tweaking that I don't know how to do).
## Technical Details
The Python module is actually a C extension. The functions that do the base work are implemented in C and can be compiled to a shared library.
You can build the shared library with CMake:
```
mkdir build/
cd build/
cmake ..
make
```
That will build the shared library `build/lib/libfirush.so` (or `.dll` on Windows).
You should be able to make a wrapper for this library in any programming language that supports the C ABI for FFI.
Windows support currently is not available because the library depends on the POSIX `regex.h` header. Support is planned by making `pcre2`'s POSIX translation layer a requirement for the Windows build.
### API
The Python wrapper for the API is available as a submodule `firush.api` of `firush` package (that you can install with instruction in the first header).
See `src/firush.c` and `include/firush.h` for the C implementation.
## Contributing
The Python wrapper is tested with `pytest`. Install the development packages via `pip install .[dev]` then run `pytest` in the source tree's root.
No tests for the C implementation, yet. Feel free to contribute some.