Skip to content

Instantly share code, notes, and snippets.

Created April 24, 2018 19:09
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save achow101/e9bfe8e65da2cb863f80a81511b4b79f to your computer and use it in GitHub Desktop.
import requests
import re
import operator
from bs4 import BeautifulSoup
r = requests.get('')
p = re.compile('member #\d+')
all_members = p.findall(r.text)
mem_dict = {}
for member in all_members:
if member not in mem_dict:
mem_dict[member] = 1
mem_dict[member] += 1
sorted_mem = sorted(mem_dict.items(), key=operator.itemgetter(1))
nums = re.compile('\d+')
for mem in sorted_mem:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment