Commit 6ce8e106 authored by rgaudin's avatar rgaudin
Browse files

reference new kiwix-owned content catalog

parent b94d6712
import os
import urllib.request
import yaml
catalog_url_path = "http://catalog.ideascube.org/"
catalog_files = [
"kiwix.yml",
"static-sites.yml",
"bibliotecamovil.yml",
]
catalog_urls = [
"http://download.kiwix.org/library/ideascube.yml",
"http://catalog.ideascube.org/static-sites.yml",
"http://catalog.ideascube.org/bibliotecamovil.yml",
]
def get_catalogs():
catalog = []
for catalog_file in catalog_files:
with urllib.request.urlopen(catalog_url_path + catalog_file) as f:
for catalog_url in catalog_urls:
with urllib.request.urlopen(catalog_url) as f:
catalog.append(yaml.load(f.read().decode("utf-8")))
return catalog
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment