Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import requests
import re
import operator
from bs4 import BeautifulSoup
r = requests.get('https://bitcointalk.org/modlog.php')
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
else:
mem_dict[member] += 1
sorted_mem = sorted(mem_dict.items(), key=operator.itemgetter(1))
print(len(mem_dict))
nums = re.compile('\d+')
for mem in sorted_mem:
print(mem)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.