Last active
April 20, 2019 18:24
-
-
Save vipulgupta2048/d4ffc1a7b84ae1325ab3ccd58de1e5bf to your computer and use it in GitHub Desktop.
Get notified about tickets @ BookMyShow, whatever it takes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Owner - Vipul Gupta (@vipulgupta2048) | |
# Description - A infinite loop trapping Bookmyshow to let them know that you have come to bargain for tickets. Well, only until they block you. | |
# Real Description - Infinite loop requesting BMS every 3 minutes for availablity for Movie Tickets. | |
# Pre-requistes - sudo apt install beep | |
# - pip install beautifulsoup4 requests | |
# - sudo modprobe pcspkr | |
# Language - Python3 | |
import requests | |
from lxml import html | |
from bs4 import BeautifulSoup | |
import os | |
import time | |
Movie_url = ENTER_MOVIE_URL | |
# Test URL be like https://in.bookmyshow.com/national-capital-region-ncr/movies/avengers-endgame/ET00090482 | |
while True: | |
r = BeautifulSoup(requests.get(Movie_url).content, "html.parser").find("a", {"class":"showtimes btn _cuatro"}) | |
if(r!=None): | |
os.system("beep") | |
print("Get the tickets Whatever it takes") | |
else: | |
print("Tickets aren't open yet") | |
time.sleep(180) | |
# https://in.bookmyshow.com/national-capital-region-ncr/movies/avengers-endgame/ET00090482 | |
# For testing - https://in.bookmyshow.com/national-capital-region-ncr/movies/shazam/ET00072971 | |
# This is the by far the worst most effective script in this universe, but still reviews appreciated. |
I tried running it
It is giving the same output and my kernel got pannicked , even I tried restarted the Kernel
At first it got started but then it got hung .
W*F!! ;)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TIME FOR THE CHALLENGE
Run the following code again, and try stopping the outcome.
Let me know what you observed, what you tried, how you solved it, why does it happen.