Sam Sargeant

Opinion, technology, Internet, dull life stuff

Archive for the ‘twitter’ tag

Twitter bot: NZ police updates

with 3 comments

I’ve subscribed to the email updates from our police for a while now. Given these updates were usually about things happening live, I thought it’d be useful to write something to post them into Twitter.

After about an hour of hacking, I had a quick and dirty script that did the job. There are three users you can follow if you are so inclined:

The script uses BeautifulSoup, a particularly excellent python library that ZachTwo reminded me about. I’d prefer it if the police released their updates in a better format, but screen-scraping will do for now.

Read on for the script. Consider it under a GPL licence.

Read the rest of this entry »

January 23rd, 2009 at 3:33 pm

Tagged with , ,