WiiCheck

From nikosapi.org wiki
Jump to: navigation, search
Wii.jpg

If you live in Canada, have access to a bash shell and really want a Wii I wrote a script that will facilitate that process. It works by downloading the online availability info from futureshop and bestbuy then it preforms two checks on it. The first (but most effective) is the grep test which uses grep to find the string "in stock" in the downloaded files, the second uses md5sum to see if the availability info has changed (just in case). If the grep test is true it uses mplayer to play a file in the same directory as the script named song1.mp3 and if the md5sum check is false (you'll know what I mean by looking at the script) it plays a file named song2.mp3 in the current directory. If either of the checks are positive it'll open Firefox to the futureshop/bestbuy page that lets you buy a Wii. The script checks for new Wiis every 5 minutes but that can easily be changed. Download here: wiicheck-1.1.txt
Make it executable with:

mv wiicheck-1.1.txt wiicheck-1.1
chmod +x wiicheck-1.1

Then run it:

./wiicheck-1.1

Running the script produces a lot of output so you can always redirect that to a log file by running it like this:

./wiicheck-1.1 >> wiicheck.log

Options are:

--test-fs-grep make sure the grep check works (futureshop)
--test-bb-grep make sure the grep check works (bestbuy)
--test-fs-md5 make sure the md5sum check works (futureshop)
--test-bb-md5 make sure the md5sum check works (bestbuy)

In the script there are 3 md5s for futureshop and 2 for bestbuy that are known to be used for "out of stock", you can add your own by md5sum'ing the onlineavailability.asp?sku_id=* files and adding your own md5sums. Remember just add a comma to the line of md5s and then add your own (just make one big line).

Happy Wii hunting!

nikosapi

P.S. This does work, I can prove it ^_^