In 2012 I developed an unhealthy obsession with steamgifts.  One of the ‘problems’ with this site is that you accumulate points over time, but only when you have fewer than 300 on your account.  The solution?  Automation!

Using C#, Selenium, Firefox and SQLite I wrote an application which periodically scrapes and enters contests.

I give each game I care about a priority, and my application then enters contests in the order of priority descending, soonest first.  In the event that I do not have enough points to enter a contest, other contests are cancelled in order of priority ascending, soonest first.  After all contests with a priority have been entered, contests with a priority value of 0 (default) are entered in order to ‘bank’ points (store them in contests to keep the number of points on my account below 300) – contests are entered latest first for the purposes of banking points.  Contests entered for the purposes of banking may cancel other contests entered for banking, in order to postpone the ‘expiration’ of points (when the contest is closed) for as long as possible.

I have experimented with scraping Steam, Desura and metacritic for scores and pricing information, as prices are relevant for Gala Giveaways and metacritic scores may provide better default priority values.

I previously added support for Gala Giveaways and Tremor Games, though I haven’t updated the codebase to account for CSS changes on those sites (I’ve been too busy working on my MSCS thesis.)

I have not, and will not, distribute this software (though it doesn’t appear to be against the steamgifts TOS.)  I’m only discussing it here as an example of browser automation, since a similar approach could be used for scraping forums, automating things on Kickstarter, etc.

Advertisements