您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Extract player rankings data (name, level, experience) and export to CSV, JSON
Script that allows you to extract all players from a server, by rank, name, and experience.
The script can be useful for worlds in decline and allows you to see the actual activity of players present over a constant period of time, such as a day, week, or month. This will depend on when you use it.
📜 Script Overview — The West Rankings Exporter
🎮 Integration in the Game
Adds a CSV button to the game menu (or floating button as fallback).
Context menu with options:
- Export current page
- Export all pages
- Export with filters
- Export a page range
- Pause / Resume / Stop scraping
- Access to settings
⚙️ Configuration & Persistence
- Export formats: CSV (default), JSON (Excel planned).
- Custom filters: min/max level, min/max rank.
- Performance settings: fixed delay or adaptive delay based on load times/errors.
- Persistent storage:
Saves configuration
Saves export progress (resumable within 24h).
📊 Data Collection & Processing
- Extracted fields: rank, name, level, experience (formatted + raw).
- Sorting and deduplication before final export.
- Auto-save progress every 5 pages (if enabled).
🔄 Robust Scraping
- Structure validation: checks required HTML elements before extraction.
- Smart navigation: input field, Ajax call, or pagination click.
- Retry system: multiple attempts per page.
- Adaptive delay: increases if slow performance or errors.
- Page load timeout: abort after 10s if no rows detected.
📌 Progress Interface
- Progress dialog with:
- Progress bar
- Estimated time remaining
- Stats (players collected, avg page time, errors)
- Control buttons: Pause / Cancel
⚠️ Error Handling & Messages
User messages (in-game popups):
- Error → not on rankings page, no data found, too many failures, download issues.
- Warning → game structure changed, missing HTML elements.
- Success → export finished, current page exported, resume successful.
- Info / Hint → scraping started, progress saved, scraping stopped.
- Logging system (console): levels debug, info, warn, error.
- Exit protection: warns if leaving the page during an export.
📂 Final Export
- CSV: Rank, Player Name, Level, Experience, Raw Experience.
- JSON: includes metadata (date, version, filters, total players).
🚨 List of Error Messages & Triggers
Message Type ► Trigger Condition
❌ "Please navigate to the rankings page first" ► User tries to export outside the rankings page
❌ "No data found on this page" ► No rows detected during extraction
❌ "Scraping already in progress..." ►User attempts to start a new export while one is running
❌ "Too many failures, stopping export" ► Navigation failed after max retries
❌ "Error downloading file" ► Failure when generating the CSV/JSON file
⚠️ "Game structure may have changed. Some features might not work correctly." ► Required HTML elements missing
⚠️ "Page load timeout after X ms" ► Page did not load within timeout
✅ "Export completed!" ► All pages scraped successfully
✅ "Current page exported" ► Export of only the current page
✅ "Resuming from page X" ► Export successfully resumed
ℹ️ "Starting scraping of N pages..." ► Beginning of a full export
ℹ️ "Progress saved" ► Progress saved automatically (every 5 pages or pause)
ℹ️ "Scraping stopped. Partial data saved" ► Export manually stopped with partial results
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址