This is no-guarantees, probably-full-of-bugs-but-good-enough, script to automate submission of promo codes to Estrella Damm's Sónar 2013 contest.
First you need to make an account at the contest website. Then you can use your account with the script:
ruby submit_promo_codes.rb
When you run it, you'll be prompted to choose whether to use it interactively or to process a promo code input file.
Using the script interactively looks like this:
ruby .\submit_promo_codes.rb
Please enter a number, one of:
1. Log in
2. Submit promo code
3. Get stats
4. Exit
5. Operate with file
Your choice:
5
Enter relative path to file:
sample_input.txt
Login unsuccessful
Code accepted? N - Entries: 0 - Codes: 0/30
If you choose to use the script with an input file, the file needs to have the following format:
- First line has username
- Second line has password
- Following lines promo codes, one per line
For example:
username@example.org
example password
DEADBEEF
AAAAAAAA
NOTACODE
As part of the Sónar 2013 music festival Estrella Damm put on a contest to give away free entries to the Pet Shop Boys concert on the second night of the music festival.
The contest consists of collecting 30 the stickers from bottles of Estrella (medium size, no quintos) in order to participate in the drawing an entry to the concert. Each sticker contains an unique pormo code on the back that needs to be entered on the contest website.
When you have this many stickers ...
... it's worthwhile trying to find a way to automate the process.
An effective way to do this manually is to go through each sticker and copy the promo code into a spreadsheet, then once you have 30 of them, copy and paste each one into the submission form. This allows us to mark a promo code as invalid and later check if there was a typo with it.
This is boring, so I wrote this script to automate it.
You need to have the excellent HTTParty gem installed.
You can reach me at abraao@alourenco.com, @abelourenco. You can visit my website at http://www.alourenco.com.