Skip to content

Commit

Permalink
fixed the roomfinders _download_map function not delivering kmz ent…
Browse files Browse the repository at this point in the history
…ries
  • Loading branch information
CommanderStorm committed Apr 30, 2024
1 parent 6f30248 commit 921ceca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/external/scrapers/roomfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,14 @@ def _download_map(_map_id: str, e_id: str, e_type: Literal["room", "building"])
base_url = "https://portal.mytum.de/campus/roomfinder/getRoomPlacemark"
url = f"{base_url}?roomid={urllib.parse.quote_plus(e_id)}&mapid={_map_id.removeprefix('rf')}"
try:
_download_file(url, filepath)
return _download_file(url, filepath)
except requests.exceptions.RequestException:
return None
if e_type == "building":
base_url = "https://portal.mytum.de/campus/roomfinder/getBuildingPlacemark"
url = f"{base_url}?b_id={e_id}&mapid={_map_id.removeprefix('rf')}"
try:
_download_file(url, filepath)
return _download_file(url, filepath)
except requests.exceptions.RequestException:
return None
raise RuntimeError(f"Unknown entity type: {e_type}")

0 comments on commit 921ceca

Please sign in to comment.