Download osu!replay files!
Make sure to have at least nodejs v7.6.0 installed! (or whatever the version is where async/await works properly)
Before first use make sure to npm install.
Usage: node fetch.js -k <api-key> -u <user-id> -b <beatmap-id> [-h <beatmap-hash>] [-m <mode>] [--mods <bitmask>] [-o <output-file>]
Notes:
- Optionally provide the beatmap-hash, so the script doesnt have to fetch it from the API. Saves an API-call if you already have the data.
- When no mode is given, it defaults to std.
- When no mods is given, it defaults to the first score it finds on the server, which I think is the score with the highest PP.
- When no output-file is given, stdout will be used.
Get an api-key here: https://osu.ppy.sh/p/api
Run node server.js. Following environment variables are used for configuration:
API_KEYyour osu! api key. Mandatory, program will exit if not provided.LISTENport to listen on, or a path to a unix socket. Defaults to 3000.LISTEN_HOSTwhat interface to listen on, defaults to localhostLISTEN_CHMODifLISTENis a socket file and this value is provided, this value will be used to chmod the socket file. Otherwise it does nothing.DOWNLOAD_PATHwhat the url must be to the download action, defaults to/download
This means that with default config the path to the download action is http://localhost:3000/download. Anything else will trigger a 404.
Arguments are given via the querystring. Same arugments apply as with the commandline option.
userIdbeatmapIdbeatmapHash, optional, if provided saves one api call.mode, optional, defaults to stdmods, optional, with the same caveat as above
Example: http://localhost:3000/download?userId=718454&beatmapId=1201636&mode=0&mods=0