Why too many Swedes in your vicinity aren’t good for you
Samstag, 25. Juni 2005, 00:26 UhrWe currently have two of Andreas’s Swedish friends visiting us. Apparently, a major sport of Swedes abroad is to hunt for cheap booze. But how to find out if the bottle you’re currently looking at actually *is* cheap?
The Swedes had an idea. It’s important to know that the Swedish alcohol market is controlled by the state, so booze is only sold in one chain of shops, systembolaget.se. Their prices are the same throughout the whole country, and the website has a search function where you can check the prices.
So why not use a GPRS cell phone to check what the bottle in front of you would cost in Sweden?
Well, I decided to let the guys do the cooking and to find out how to do this. And yes, it only took me some 2-3 hours to throw something together. I’m releasing it under the GPL; go get it here. It actually was really easy; just one WML page and some 80 lines of Perl code.
The code uses CGI::WML which subclasses the well-known CGI module. All it does is query the systembolaget website (which accepts query parameters via HTTP GET), parse the returned HTML page, extract the price information and return it to the client formatted as a WML page. It also converts the Swedish systembolaget prices to Euro for easier comparison.
You can have a look at the running script here, but that will only work in a WAP browser. If you don’t have a cell phone that you can use (or if you want to save money): There is a WAP browser Firefox extension, or you can use an online emulator like the one at wapsilon.com.
This was fun — plus it saved me from having to help with making dinner, and I have two more acronyms I can mention in my CV now ;)
The code is not abandoned (yet…) ;) Further information on a separate page.
Yay you for doing it.
And it was used for real .)