This post is about a script I wrote last year, and have been actively maintaining. If this is the first post you've seen about this, welcome! The script is designed for the TamperMonkey browser plugin, which you can get here: https://www.tampermonkey.net/ User scripts can be dangerous, so it's always best to vet the code and not to blindly install anything. I've done my best to comment things that it does, you're also welcome to copy/paste the code into GPT and have it break it all down as well.
Itch user IntuitiveThinker asked if there was any way to export item types to the CSV (ie: Digital game, physical game, sound track, etc). I looked into it, but at the time of writing there doesn't seem to be any way to get any of that information from the code.
Tags also don't seem to be accessible, which is kind of a bummer. We can search things like "NES ROM" or "Music" and get results back based on how the items are tagged - but that information is not returned back in the code.
The best way I could think of approaching the question from IntuitiveThinker was to export the Blurb section of the items. It means a bit of manual work on your part, but it also means the ability to export additional data beyond what Itch normally allows.
I've also refactored the code so it's finding the elements much more efficiently than before. I'm not sure if there's any noticeable improvements from a usability standpoint, but from a developer standpoint the code is nicer to look at lol.
Updates are always done to the same gist, so the link never changes, and can be found here: https://gist.github.com/abraxas86/ad72ba46b6cdd86dc63058bba0c629c2
It's been so cool seeing all the comments on my posts for this script recently. I'm glad people have found their way here and that my script is helping the community out. I don't think I could ever code a game or anything like that, so this is the best way I can give back to the community.
Thanks again for the suggestion, IntuitiveThinker! If anybody has suggestions or ideas, please let me know! I'm always willing to try.
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.
Hi! First off, thank you very much for this script. I'm trying to import the games and software I have here into a frontend (Launchbox) and this thing you made is a huge time saver, I really appreciate it.
With that being said, I'm not sure if I'm missing something, but is there a way to make the script work with bundles? I've tried both in pages that the urls start with "itch.io/bundle" and "itch.io/b" but nothing shows up at the bottom of the page. Knowing nothing about programming, I added a "// @match https://itch.io/b/*" in the beginning of the script hoping that that would work but it didn't =(
Well, even if it's not possible i really appreciate the script and it'll definitely help mme a lot!
I think what you tried should have worked. I'll see what I can find - it may be due to the way the bundle pages are set up and the way that my code is set to scrape.
I'm going in with the assumption that you want to scrape something like this: https://itch.io/b/520/bundle-for-racial-justice-and-equality
It's maybe the only bundle I've ever bought, and it's absolutely massive - so I hope that if I can get it working there, it will work anywhere lol.
Yeah, so the Bundles are coded totally different from the grid lists. It's absolutely scrapable, though. I'm working on it now.
Almost done.Found a few things to improve along the way, just working out some kinks[EDIT] Turns out the bundle lists are not the same as the typical game lists. Need to find a way to identify these.
Had to take a break for a while to deal with real life for a bit lol. The script should be good now, though! Same link as before. Let me know how it goes!
Hi! Thanks for helping me, I really appreciate it =))
Unfortunately though, it's not working with bundle pages. Now the csv file is not empty, but the only data filled in are gameId, imagepath and url, which in this case is undefined
Aw man, I thought I had it working... sorry for the let-down. I'llt take another swing at it hopefully tomorrow.
It's ok! no need to worry about it haha
Try it now. I realized I also left some debug code uncommented... whoops. I tested it out a bit more thoroughly and it seems to be working better now.
"was to export the Blurb section of the items. It means a bit of manual work on your part"
What does a user need to do on their part to allow the Blurb section to be part of the csv export?
If you enter a blurb. it should be bundled into the export without any further work on your part. If that's not the case, let me know and I can see if I can figure out what's happening.