Created
September 12, 2022 16:05
-
-
Save mkoeppe/5da92ff1703e941c3d21a7a7187a23ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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