1
0
mirror of https://github.com/pirate/ArchiveBox.git synced 2025-08-13 10:04:31 +02:00

fix headers Elapsed timedelta is not a JSON-serializable

This commit is contained in:
Nick Sweeting
2024-08-26 20:15:22 -07:00
parent 917af4b1d7
commit 6ffa710bb3

View File

@@ -273,8 +273,8 @@ def get_headers(url: str, timeout: int=None) -> str:
{
'URL': url,
'Status-Code': response.status_code,
'Elapsed': response.elapsed,
'Encoding': response.encoding,
'Elapsed': response.elapsed.total_seconds()*1000,
'Encoding': str(response.encoding),
'Apparent-Encoding': response.apparent_encoding,
**dict(response.headers),
},