Last active
October 25, 2018 19:35
-
-
Save thcipriani/4711dcec0a4ee63048dc242eaf254cb9 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
wmf-folks | |
~~~~~~~~~ | |
A naïve attempt to answer the burning question: *exactly* how many | |
people work at the Wikimedia Foundation now? | |
""" | |
import requests | |
from bs4 import BeautifulSoup | |
STAFF_PAGE = 'https://wikimediafoundation.org/role/staff-contractors/' | |
r = requests.get(STAFF_PAGE) | |
r.raise_for_status() | |
folks = set() | |
soup = BeautifulSoup(r.text, 'html.parser') | |
for a in soup.find_all(attrs={'class': 'staff-list-item'}): | |
folks.add(a['href']) | |
print('{} WMF folks'.format(len(folks))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment