aboutsummaryrefslogtreecommitdiff
path: root/https-what-repos.py
blob: 9237f769c399ddada339a6e14ceaeab8a37700b4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env python

# List Cryptech git repository URLs by scraping them from the
# automatically generated Trac page.  Yes, we know too much about how
# the generation script and Trac format this page, c'est la vie.

from urllib                     import urlopen
from xml.etree.ElementTree      import ElementTree

url = "https://wiki.cryptech.is/wiki/GitRepositories"

for x in ElementTree(file = urlopen(url)).iter("{http://www.w3.org/1999/xhtml}code"):
    if x.text.startswith("https://git.cryptech.is/") and x.text.endswith(".git"):
        print(x.text)