PHP based website scraper and .ics vCalendar file creator

KAVA, The national audiovisual archive of Finland has its own cinema, but they don’t provide standard .ics vCalendar of the movie showtimes for downloading or subscription. However, they have their own web store to buy tickets, and the page is neatly formatted.

I decided to practice website scraping a bit and as a bonus to try to create an ICS vCalendar file from the scraped data. The result is basically for my own use, but available for everybody (Download link of the generated calendar). The caveat is that if KAVA decides to change the layout the code wouldn’t work anymore, so be warned that the calendar may be broken then for a while.

The showtimes don’t change that much, so it’s safe to set the update period to once per week. Set the subscription to the address

http://www.sanaracreations.fi/apps/kavacal/kavacal.php

 

KAVA has changed their site’s layout and the code is not functional any longer. Take a peek at the website scraper code and hack on!

Leave a Reply