Skip to content

Instantly share code, notes, and snippets.

@mkoeppe
Created September 12, 2022 16:05
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 mkoeppe/5da92ff1703e941c3d21a7a7187a23ba to your computer and use it in GitHub Desktop.
Save mkoeppe/5da92ff1703e941c3d21a7a7187a23ba to your computer and use it in GitHub Desktop.
# Adapted from scripts/geocode.py
import certifi
import urllib3
import pprint
from xml.dom.minidom import parseString
http = urllib3.PoolManager(
cert_reqs='CERT_REQUIRED',
ca_certs=certifi.where()
)
ack = parseString(http.request('GET', 'https://raw.githubusercontent.com/sagemath/website/master/conf/contributors.xml').data.decode('utf-8'))
usernames = {}
for c in ack.getElementsByTagName("contributors")[0].childNodes:
if c.nodeType != ack.ELEMENT_NODE:
continue
if c.tagName != "contributor":
continue
trac = c.getAttribute("trac")
github = c.getAttribute("github")
if trac and github:
usernames[trac] = github
pprint.pp(usernames)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment