To watch Oppenheimer 🎞️

2023-10-06

I have been waiting to see Oppenheimer in IMAX ever since they announced it. Well it doesn’t sound like a big deal, but where I live now there are only two IMAX screens. It’s hard to get tickets on the weekends for a movie like Oppenheimer for atleast a month. I faced this same with Avatar way of water.

It would be great if there is a way to get notification when booking is started on BookMyShow. Someone must have already done it right??.

I came across this project on github BookMyShow-ticket-notifier-telegram-bot. This looks promising. But after trying for a while, it was evident that bookmyshow api url which the bot uses is getting blocked by Cloudflare. The same URL loads up in a browser. Interesting….

Turns out Cloudflare’s bot detection is flagging our requests. I went into the rabbithole of bypassing cloudflare webscraping protection. Found some projects like cloudscraper. None of them worked properly. I came to the conclusion a reliable way to bypass this is using headless browser.

At this point I’m losing time and motivation, let’s take a step back. We just want to book the tickets, I started looking for other ticket booking services and found Paytm!. Fortunately they allows booking movies through their website even better you can see the api calls.

paytm request

Victory

Using this paytm api I made a golang library and cli tool to check if boooking is started. Here it is alertmyshow. It doesn’t actually alert you, for that we can use a telegram bot to send a message in a channel.

alertmyshow -poll 30  -t "oppenheimer" -l english   -s "imax 2d" -c chennai -d 2023-10-12 -v "pvr,luxe" && ./alert.sh

poll every 30 minutes

alert.sh is the telegram alert script

#! /bin/bash

# alert.sh

curl -X POST \
     -H 'Content-Type: application/json' \
     -d '{"chat_id": "$CHAT_ID", "text": "Tickets Available now", "disable_notification": false}' \
     https://api.telegram.org/bot$BOT_TOKEN/sendMessage

Everything ready, now we wait for the alert….

I ended up missing the telegram notification and watched the movie like this :/.

meme