This commit is contained in:
doms9 2025-09-24 01:00:30 -04:00
parent 60a3df950a
commit 00000d979a

View file

@ -55,12 +55,13 @@ replace_ids = {
} }
async def fetch_xml(url: str) -> ET.Element: async def fetch_xml(url: str) -> ET.Element | None:
try: try:
r = await client.get(url) r = await client.get(url)
r.raise_for_status() r.raise_for_status()
except Exception as e: except Exception as e:
raise SystemExit(f'Failed to fetch "{url}"\n{e}') from e print(f'Failed to fetch "{url}"\n{e}')
return
try: try:
decompressed_data = gzip.decompress(r.content) decompressed_data = gzip.decompress(r.content)
@ -68,7 +69,7 @@ async def fetch_xml(url: str) -> ET.Element:
return ET.fromstring(decompressed_data) return ET.fromstring(decompressed_data)
except Exception as e: except Exception as e:
raise SystemExit(f'Failed to decompress and parse XML from "{url}"\n{e}') from e print(f'Failed to decompress and parse XML from "{url}"\n{e}')
def hijack_id( def hijack_id(