Categories
Web

PHP based website scraper and .ics vCalendar file creator

PHP application for scraping a website and to create a vCalendar ICS file from the data.

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!

By Janne Särkelä

Sanara Creations is the professional dimension of sound designer, producer and artist Sarana / Janne Särkelä.

Tools: Logic, Cubase , Pro Tools, Photoshop, Illustrator, GIMP, Final Cut, Premiere, Max/MSP/Jitter, Plogue Bidule, Flash/AS, CSS, HTML, PHP, Javascript, jQuery, OSX/Win/Linux, Arduino, Processing, Captivate, Storyline.

Janne resides in Helsinki, Finland at the moment, and works at Digital Lessons Finland as the Senior Technical Developer.