How to quickly pick movies at a film festival using jQuery, Google Spreadsheets, and Python

My Dad and I are going to TIFF’12, which is one of the biggest film festivals in the world. Unlike many of the other top-tier film festivals, TIFF goes to incredible lengths to make the festival accessible to everyone, not just people in the film industry. There’s roughly 400 films this year, and each are shown at least two or three times over the week and a half that TIFF takes over virtually every movie screen in Toronto.

Picking movies for TIFF is always a complicated process, and one that changes every year. This is the first time you can sign up online – you used to fill out a crazy sheet of paper listing your first and second choices and hope your sheet got picked first. This year, you get a randomly assigned 1 hour window, but you can now see which films are already sold out and pick replacements.

I’m currently finishing up my internship at Dropbox this week, and I’m also on the opposite coast as my dad, so picking movies was going to be especially tough this time around, but I think I have a good system down.

  1. I scraped the TIFF webpage to build a spreadsheet that had the name of each film and a link to its description, stills, and trailer.
  2. I put shared the spreadsheet with my dad using Google Docs
  3. We both rated each film
  4. I wrote a script that organized the films based on our ratings
  5. I’ll use this sorted list to pick films

In case anyone else wants to do this, I’m making my scripts available:

Scraping the TIFF movie list:

Since the TIFF site uses jQuery, and has a nice DOM hierarchy for each film, this was pretty easy to do in my browser’s Javascript console: parse-film-page.js


The result is a CSV formatted list of each movie. Just put that in a Google Spreadsheet (or some other spreadsheet program) and you can quickly click each link, decide how interesting the movie looks, and add your rating in the spreadsheet.

In case you just want the CSV, you can download it here: tiff-12-films.csv

Sorting film picks

My dad and I added our scores to each movie, 1 (avoid) to 5 (must see). Google Spreadsheets made this really easy for us to both do at the same time. Since we are both fully employed and the rating process takes hours, this was very helpful.

I exported the spreadsheet with scores back out to a CSV and implemented a Python script that put each movie into one of six buckets:

  1. Both of us rated ‘5’
  2. One of us rated ‘5’
  3. Both of us rated ‘4’
  4. One rated ‘4’, one rated ‘3’
  5. One rated ‘4’, one rated ‘2’
  6. Both rated ‘3’

The script spit out another CSV that I’ve imported back into the Google Spreadsheet, which I’ll use when I’m picking movies in my one hour window. I’ll try to fit in as many of the first bucket before going down the next, until I’ve picked all twenty movies we’ll see over the five days we’ll be in Toronto.

You can find the sorting script here: pick-films.py

Good luck to everyone doing their TIFF’12 picks this weekend!