aaronzirbes/moolbot — pull request #1 by boggebe (2013-12-04 05:34:24+00:00)
Title: Add better beer advocate script.

Probably not the prettiest coffeescript ever written, but it's my first go at things. I tested with a handful of beers, some well known, and some not. I also tested with invalid beers.

1. The script searches BA using the query provided.
2. Gets the page for the first result.
3. Hacks the first result HTML to pieces, getting relevant info.
4. Sends the messages to HipChat.

The script sends two messages.
The first looks like:
> Supplication (Russian River Brewing Company)
California, United States
American Wild Ale | 7.75% ABV
BA Score: 100
Bro's Score: 100

And the second is a link to an image of the beer that BA displays on the beer profile page.