A place for my programming projects and the occasional blog about technology related matters.
Danish TV Guide
Author einar
I’ve been living in Denmark for the past year as I study for my Masters in Computer Science at DTU. In my danish apartment I get a few danish, swedish and norwegian tv stations. I was getting tired of flipping through them at night and looking at the teletext for each of them to figure out if anything good was on, so I thought it would be nice to have my very own tv guide for exactly the stations I had available. And, being a big nerd, I decided to do something about it!
I’ve done a bit of screen scraping in Python but this was the first time I used the excellent Beautiful Soup library. It makes screen scraping a thousand times easier and handles badly formed html very well. So, I created a small script that screen scraped the tv listings for the stations I watch, and then spit out my own personal tv guide where the listings are aligned by time so I can quickly see for a given hour exactly what is on tv on all the stations. The script is simple, it has a base class TVListing and then a few different subclasses for different stations. Fortunately a few of them use the same format so I didn’t have to do a class for each station. It would be easy to customize this to add more stations or re-order them or whatever. The output from the script can be viewed here and it can be downloaded here or viewed syntax highlighted here.
Reader's Comments
Comment
Options
-
August 25, 2008 -
code, python, utilities -
3 comments
-
Comments RSS -
Del.ico.us
-
Digg!
Categories
- ASP.NET (2)
- C# (5)
- cardgames (1)
- code (13)
- extensions (2)
- haloscan (1)
- javascript (3)
- meta (2)
- mozilla (2)
- msn (1)
- MVC (1)
- plugins (2)
- python (4)
- tips & tricks (4)
- utilities (2)
- Visual Studio (1)
- wordpress (5)
- zenphoto (2)
Nörd!
Being a dane, may I ask you if you know about the Xmltv project?
As a derived project, there is a site dedicated to the production of XML output for danish tv line ups with all the bells and whistles of a TV guide.
http://niels.dybdahl.dk/xmltvdk/index.php/Forside
Peter
Thanks for letting me know. That looks like something I could use instead of my own hack