Skip to content

Instantly share code, notes, and snippets.

@MichaelDiBernardo
Created February 19, 2014 16:25
Show Gist options
  • Select an option

  • Save MichaelDiBernardo/9095575 to your computer and use it in GitHub Desktop.

Select an option

Save MichaelDiBernardo/9095575 to your computer and use it in GitHub Desktop.
Find random Price is Right game
import random
import requests
from bs4 import BeautifulSoup
if __name__ == "__main__":
r = requests.get("http://en.wikipedia.org/wiki/List_of_The_Price_Is_Right_pricing_games")
soup = BeautifulSoup(r.content)
games = soup.find_all("span", {"class":"mw-headline"})
while True:
choice = random.choice(games).text
if len(choice) <= 1:
continue
print choice
break
@hghazal
Copy link
Copy Markdown

hghazal commented Feb 19, 2014

NICE 👍

@hidrees
Copy link
Copy Markdown

hidrees commented Feb 19, 2014

Haha love this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment