This repository contains Python tools for scraping and managing resource metadata from the MapleStory Worlds API. These tools help collect GUIDs, tags, and image paths for various game assets.
The tools consist of two main scripts:
gen-ruids.py: Bulk scraper that discovers resources by categorypop-ruids.py: Targeted scraper that fetches metadata for specific GUIDs
Both scripts interact with the Nexon MapleStory Worlds API to collect resource information including:
- Resource GUIDs (Globally Unique Identifiers)
- Display names (tags)
- Image file paths
- Asset metadata
pip install httpx asyncioSet your API token as an environment variable:
export API_TOKEN="your_api_token_here"The API token should be obtained from the MapleStory Worlds platform and is required for authenticating with the Nexon API.
In the Network tab in Google Chrome (or other browser), you can obtain it from the X-Mverse-ifwt header.
You must be logged into the MapleStory Worlds API to obtain this header.
This script scrapes resources by category, discovering all available assets within specified categories.
- Category-based scraping: Processes different asset categories (sprites, sounds, character parts, etc.)
- Concurrent processing: Uses async/await with configurable concurrency for efficient API usage
- Resume capability: Tracks completed pages and can resume interrupted scraping sessions
python gen-ruids.pyEdit the CATEGORIES dictionary in the script to enable/disable specific categories:
CATEGORIES = {
'sprite': '0', # Enable sprite category
# 'sound': '1,19', # Uncomment to enable sound category
# 'hair': '25,27', # Uncomment to enable hair category
# Add other categories as needed
}For each category (e.g., 'sprite'):
tags/sprite_tags.json: Maps display names to GUIDsguids/sprite_guids.json: Maps GUIDs to image pathsdone/sprite_done.json: Tracks completed pages for resume functionality
This script fetches detailed metadata for specific GUIDs listed in a text file.
This is useful for the following categories, which are not listed on the MapleStory Worlds website:
- Name tag RUIDs
- Chat balloon RUIDs
- Tileset RUIDs
- Create a
populate.txtfile with GUIDs to process:
# This is a comment - lines starting with # are ignored
guid-1234-5678-9abc-def0
guid-abcd-efgh-ijkl-mnop
# Another comment
guid-qrst-uvwx-yz12-3456
- Run the script:
python pop-ruids.pytags/populate_tags.json: Maps display names to GUIDsguids/populate_guids.json: Maps GUIDs to image paths
Both scripts include configurable parameters:
COUNT = 100 # Items per API request page
CONCURRENCY = 8 # Number of concurrent requests
TIMEOUT_SEC = 15.0 # Request timeout in secondsruid/
├── maplestory_api.py # Shared API utilities module
├── gen-ruids.py # Category-based scraper
├── pop-ruids.py # GUID-specific scraper
├── populate.txt # Input file for pop-ruids.py
├── tags/ # Tag-to-GUID mappings
│ ├── sprite_tags.json
│ └── populate_tags.json
├── guids/ # GUID-to-path mappings
│ ├── sprite_guids.json
│ └── populate_guids.json
└── done/ # Progress tracking
└── sprite_done.json
The scripts interact with the Nexon MapleStory Worlds API:
- Base URL:
https://mverse-api.nexon.com/resource/v1/search - Authentication: Bearer token via
X-Mverse-ifwtheader - Rate Limiting: Implemented via concurrent request limits
{
"sprite-example-001": "guid-1234-5678-9abc-def0",
"sprite-example-002": "guid-abcd-efgh-ijkl-mnop"
}{
"guid-1234-5678-9abc-def0": "character/face/001.img/default",
"guid-abcd-efgh-ijkl-mnop": "map/background/forest.img"
}The scripts include comprehensive error handling for:
- Network issues: Automatic retry and timeout handling
- API errors: Graceful handling of API response errors
- Interruption: Ctrl+C handling with progress saving
Feel free to raise issues in case any logic is incorrect.
This project is intended for research and development purposes.
HTTP timeout errors / JSON decode errors
- Usually indicates rate limiting - reduce
CONCURRENCYto lower network load - Verify API endpoint is accessible and the API_TOKEN is valid