Commit e5074fbc authored by Eric Duminil's avatar Eric Duminil
Browse files

Zip files are for Brandenburg

parent 35569a34
......@@ -2,6 +2,7 @@ import re
from datetime import datetime
from citygml_download import TMP_DIR, Bundesland, CityGMLWithDate, download_all_files, download_file
from zipfile_download import ZipFile
BRANDENBURG = Bundesland(
"Brandenburg",
......@@ -20,18 +21,18 @@ if __name__ == "__main__":
if not html_path.exists():
download_file(BRANDENBURG.source, TMP_DIR / html_path)
citygmls = []
zipfiles = []
with open(html_path) as html:
for line in html:
if m := ZIP_AND_DATE.search(line):
name, date = m.groups()
citygmls.append(
CityGMLWithDate(
zipfiles.append(
ZipFile(
url=BRANDENBURG.source + name,
bundesland=BRANDENBURG,
source_date=datetime.strptime(date, "%Y-%m-%d %H:%M"),
)
)
download_all_files(citygmls)
download_all_files(zipfiles)
Supports Markdown
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