itchio / itch.io

:bug: Public itch.io issues tracker and documentation - use support instead for private information!
https://itch.io/support
240 stars 26 forks source link

Download purchases through API #1569

Open MarkOates opened 7 months ago

MarkOates commented 7 months ago

Problem

I recently bought a lot of asset packs as part of the Spring Sale 2024. I now have a long list of things to download and consolidate, and it would be nice if I there were a direct way to access the asset pack files directly through an API request (using curl and a token, for example).

API Feature Request

Probably an API endpoint that would provide a direct download.

This is something similar to https://itch.io/api/1/KEY/game/GAME_ID/purchases.

Some other solutions

MarkOates commented 7 months ago

Quick update on this issue. I've worked out a process by pulling HTML from the my purchases page, parsing with a Ruby script to generate a CSV that I imported to Google Sheets. Then using a very elaborate AppleScript (ran via osascript from the terminal manually for each asset pack), I automated the control of the browser to go to the download page for the asset pack, find and click each download button, record the text label next to that download, and then move the downloaded assets with a download_log.txt file into that asset pack's folder in the final Assets/ folder.

The process was good enough and it took me about a whole day to download all the files.

mainrs commented 6 months ago

There is also a bunch of userscripts that do the same: https://greasyfork.org/en/scripts/by-site/itch.io

You require a userscript browser extension like Greasemonkey. Please make sure to take a look at the scripts and don't run them blindly.