Git Product home page Git Product logo

nekogitv2's Introduction

Nekogitv2

a nekopoi site mirror and extractor.

python Flask Jinja2 BeautifulSoup4

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]

Loading

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!

Setup

$ git clone https://github.com/motebaya/nekogitv2
$ cd nekogitv2
$ python3.10 -m pip install -r requirements.txt
$ python manage.py --help

Usage (CLI)

  • -e, --extract: extract content such as covers, thumbnails, index/list from site. you need extract hanime-list first before download all thumbnails/covers.

    python3.10 manage.py --extract hanime-list
    
  • -m, --migrate: migrate a raw json database from app/models/database/hanime/Json/hanime-list.json to sqlite3 database, default path (app/models/database/nekodata.db)

    python3.10 manage.py --migrate

Usage (web server)

  • 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.

License

This project is licensed under the MIT License.

nekogitv2's People

Contributors

motebaya avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

deyman12

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.