Last active
October 13, 2020 22:21
-
-
Save calvinhp/df4c63bb7d8a0f2635f8a52d10990c38 to your computer and use it in GitHub Desktop.
Picking a meetup winner with requests and beautifulsoup
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
import requests | |
import random | |
from bs4 import BeautifulSoup | |
r = requests.get("https://meetingplace.io/indypy/events/2649/rsvps") | |
soup = BeautifulSoup(r.text) | |
members = soup.findAll("div", {"class":"member-name"}) | |
print(random.choice([t.text for t in members])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment