mirror of
https://github.com/Powerful-517/yys-editor.git
synced 2026-03-05 15:05:27 +00:00
37 lines
671 B
Markdown
37 lines
671 B
Markdown
# Shikigami Scraper
|
|
|
|
This script scrapes Shikigami data from the official Onmyoji website and updates the configuration.
|
|
|
|
## Usage
|
|
|
|
1. Install dependencies:
|
|
```bash
|
|
cd scripts
|
|
npm install
|
|
```
|
|
|
|
2. Run the scraper:
|
|
```bash
|
|
npm run scrape
|
|
```
|
|
|
|
The script will:
|
|
- Fetch all Shikigami from different rarity types (SSR, SP, UR, SR, R, N, L, G)
|
|
- Download images to `public/assets/Shikigami/{rarity}/`
|
|
- Update `src/data/Shikigami.json` with the new data
|
|
|
|
## Output Structure
|
|
|
|
Images: `public/assets/Shikigami/{rarity}/{id}.png`
|
|
JSON: `src/data/Shikigami.json`
|
|
|
|
```json
|
|
[
|
|
{
|
|
"avatar": "/assets/Shikigami/ssr/596.png",
|
|
"name": "神无月",
|
|
"rarity": "SSR"
|
|
}
|
|
]
|
|
```
|