Skip to content

Instantly share code, notes, and snippets.

View MichaelDiBernardo's full-sized avatar

Michael DiBernardo MichaelDiBernardo

View GitHub Profile
@MichaelDiBernardo
MichaelDiBernardo / pick.py
Created February 19, 2014 16:25
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