A mirror site built with Flask, Bootstrap, and other libraries. The web server is designed to have no direct interaction (live scrape) with the original website at all. Therefore, it will extract all hanime content to JSON and convert it to an SQLite3 database.
Lets, see a simple flow:
graph TB
A[Manage CLI]
A ---> B[Extract all index]
A ---> C[Extract all genre]
A ---> D[Extract all hanime]
E[download all covers/thumbnails]
C ---> F[To RAW Json]
D ---> F
F ---> E
B ---> F
E ---> G[Migrate TO sqlite3]
Note
The project is just aimed at filling free time while learning about web scraping, bootstrap, and other libraries. No other intention like stealing and uploading it without the owner's permission!
$ git clone https://github.com/motebaya/nekogitv2
$ cd nekogitv2
$ python3.10 -m pip install -r requirements.txt
$ python manage.py --help
-
-e
,--extract
: extract content such as covers, thumbnails, index/list from site. you need extracthanime-list
first before download all thumbnails/covers.python3.10 manage.py --extract hanime-list
-
-m
,--migrate
: migrate a raw json database fromapp/models/database/hanime/Json/hanime-list.json
to sqlite3 database, default path (app/models/database/nekodata.db
)python3.10 manage.py --migrate
- see
.env
/environment
file, feel free to change anything. e.g:
DEBUG=false
PORT="3000"
HOST="0.0.0.0"
FLASK_SECRET_KEY="this_is_secret123"
DBPATH="/root/custom/dbath.db"
- run index file:
$ python3.10 index.py
* Serving Flask app 'app.App'
* Debug mode: off
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:5000
Press CTRL+C to quit
Important
before run the web server, make sure you've set everything up via the CLI, like downloading all the covers/thumbnails and migrating the JSON to the SQLite3 database. The web server won't run until you've migrated it to the SQLite3 database.
This project is licensed under the MIT License.