Scraping Last Minute Film Festival Tickets
Anyone who knows me well knows that I love films. So I have a soft spot in my heart for going to film festivals. I’ve enjoyed multiple years of both the Vancouver International Film Festival and the Toronto International Film Festival.
I have had the pleasure of going to a few industry-specific festivals thanks to working on software used at Virtual Reality film festivals. They’re a film nerd’s dream come true, and I love having this excuse to go.
I was excited to go to one of these festivals earlier this year. Still, I encountered a nerd’s favorite issue: a problem that automation can solve.
This festival released their tickets a few days ahead of time at 7am for the entire day. Unsurprisingly this caused a lot of server load every single morning and a lot of inconsistency in even being able to get a ticket. So on the second day of the festival, their system was inaccessible from 7am until around 10:30am. Once it was back, of course, there were no tickets left at all!
This led me to rely on their website’s “Last Minute Tickets” section every day. Unsurprisingly, there’s no way to get notified when tickets are available. You’re just stuck refreshing the page every minute and hoping something pops up that you can claim. This became incredibly frustrating right away.
Being the nerd I am, I knew I could code my way to a solution. The term for this time of website automation is “scraping” — automatically interacting with a website to pull information out of it.
Being at the conference for a week, I needed a solution I could whip together quickly to get working. So I decided to try one of the no-code scraping tools parts of a recent YCombinator batch (Winter 2021), Axiom.ai.
It’s a great little browser extension that makes it easy to map out the browser automation you want it to do, then set up a schedule for how often you want it to run.
I started by just pulling the data into a Google Sheet to verify it was working. Then, after some issues with their CSS selectors and some practical tech support from their CTO, Simon, I got things working perfectly. Every 15 minutes, it would log in to the screening portal, navigate to the Last Minute Tickets section, check if any of these were newly listed, and notify me if they were.
The last piece of the puzzle is being notified when these tickets are available. In comes the beautiful IFTTT! Again, using the API integrations available, I could set up a JSON payload that sends from Axiom.ai to IFTTT, then triggers a push notification on my phone.
It’s not pretty, but it works! Thanks to this quick system, I saw a lot of films throughout my time at the festival.
Next time I’m at a festival using this approach, I hope to take this UI automation one step further — clicking the button to get the ticket itself! My approach here allowed me to get notifications, but I still had to open my browser and click to claim a ticket. This caused me to miss out on a few screenings while away from my phone. I’d expand this system to list all the screenings I want to go to and scrape them for their availability — automatically clicking to claim a ticket whenever they’re available.
My recommendation for the festival? Fix your system. The server is going down because everyone needs to log in every day at 7am and refresh the page until tickets are available. Let people “bid” on tickets ahead of time and then lottery them off. Add in the ability to subscribe to email or push notifications to specific films you want to see for last-minute tickets. You’d avoid the refresh hell even more.
Part of my 2022 Year of ProjectsThis post is part of my 2022 Year of Projects! You can read about the project or check out the other posts below.
- January - A Crypto Skeptic makes an NFT
- February - Building a Ski Resort API
- March - Prototyping a Disc Golf Pannier Bag
- April - Unlimited Sparkling Water from the Tap
- May - Scraping Last Minute Film Festival Tickets
- June - Adding YouTube Subscriptions to Plex
- July - Adding Post Thumbnails and Having Fun with DALL-E 2