Profile photo for Manoj Memana Jayakumar

I wrote 6 lines of code so as to book a movie ticket.

There was this movie called 'Bangalore Days' which was due for release on May 30, 2014.


The movie was so eagerly awaited that I was sure that the tickets will be sold out within minutes of the online booking starting.

It was 3 p.m. on May 29th, a day before the movie's release. I checked out bookmyshow.com for Bangalore Days tickets at Kochi, Kerala. (this is where I used to stay back then).

Several theatres were listed and almost all of the tickets at all these theatres were sold out. Even if I bought tickets now, I would get seats only in the front row.

That is when I noted that PVR Cinemas ( which is the closest to my home) is not listed, because online booking at this theatre hasn't started yet.

I kept on refreshing the page after every 5-10 minutes for the next one hour just to see whether booking has started at PVR. Still no luck.

I was too lazy to keep on checking whether booking has started.

And then, it struck me! I quickly hacked up 6 lines of python code.

It essentially did this.

1. Take the URL of 'Bangalore Days' show timings at Kochi @ bookmyshow.
2. Scrape the page.
3. Inside the section where theatres are listed, check for the word 'PVR'.
If found, play 'My Apocalypse' by Metallica on my laptop and exit.
Else, go to step 2 after 5 minutes.
4. End


I ran the program and kept my laptop on. At around 10 p.m., while I was fast asleep, my laptop speakers blared out 'My Apocalypse'.

Bangalore Days. First day, first show. Platinum seats. Check.

View 100+ other answers to this question
About · Careers · Privacy · Terms · Contact · Languages · Your Ad Choices · Press ·
© Quora, Inc. 2025