def fetch_doap()

in scripts/check-coordinates-with-doap.py [0:0]


def fetch_doap(url):
    filename = 'cache/doap/%s.xml' % (slugify(url))
    if not os.path.exists(filename):
        os.makedirs('cache/doap', exist_ok = True)
        f = urlopen(url)
        with open(filename, 'w') as d:
          d.write(f.read().decode('utf-8'))
    with open(filename, 'r') as d:
        f = Graph()
        try:
            f.parse(data=d.read(), format='xml')
        except Exception:
            print(f"Error parsing {url} ({filename}))")
            raise
        return f