e
This commit is contained in:
parent
60a3df950a
commit
00000d979a
1 changed files with 4 additions and 3 deletions
|
|
@ -55,12 +55,13 @@ replace_ids = {
|
|||
}
|
||||
|
||||
|
||||
async def fetch_xml(url: str) -> ET.Element:
|
||||
async def fetch_xml(url: str) -> ET.Element | None:
|
||||
try:
|
||||
r = await client.get(url)
|
||||
r.raise_for_status()
|
||||
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:
|
||||
decompressed_data = gzip.decompress(r.content)
|
||||
|
|
@ -68,7 +69,7 @@ async def fetch_xml(url: str) -> ET.Element:
|
|||
return ET.fromstring(decompressed_data)
|
||||
|
||||
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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue