Skip to content

Instantly share code, notes, and snippets.

@fbender
fbender / xml-to-har.py
Last active September 14, 2020 11:19 — forked from craigds/xml-to-har.py
Convert Internet Explorer 'capture network traffic' XML to a HAR file (by @craigds, force-unicode-version).
#!/usr/bin/env python
"""
Converts Internet Explorer 'capture network traffic' XML to a HAR file.
Turns out that XML is just a HAR file anyways, but in XML form. So this
just converts it to JSON, and Bob's your uncle.
Requires Python 2.7+ and LXML.
"""
from __future__ import unicode_literals