This project fetches game data from 4j.com and aggregates it into a JSON collection.
- Bun is required to run the scripts.
bun installFetch all games (approx 14,000+) and save them as individual JSON files in the games/ directory.
bun run fetchNote: This process fetches data from https://www.4j.com/ajax_loadmoregames.php and parses the HTML response.
Combine all individual JSON files from games/ into a single games.json file.
bun run merge{
"id": "22508",
"name": "Magic Piano Online",
"url": "https://www.4j.com/Magic-Piano-Online",
"embedUrl": "https://www.4j.com/embed/Magic-Piano-Online",
"image": "https://www.4j.com/cdn-cgi/image/quality=78,fit=cover,format=auto/thumb/201705/Magic-Piano-Online.jpg",
"rating": "3.794875"
}An array of game objects:
[
{
"id": "22508",
"name": "Magic Piano Online",
...
},
...
]fetch_games.ts: Script to fetch and parse game data.merge_games.ts: Script to combine JSON files.games/: Directory containing individual game JSON files (generated).games.json: Aggregated data file (generated).