Skip to content

Instantly share code, notes, and snippets.

@thcipriani
Last active October 25, 2018 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thcipriani/4711dcec0a4ee63048dc242eaf254cb9 to your computer and use it in GitHub Desktop.
Save thcipriani/4711dcec0a4ee63048dc242eaf254cb9 to your computer and use it in GitHub Desktop.
#!/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