Skip to content

Instantly share code, notes, and snippets.

Created April 24, 2018 19:09
What would you like to do?
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