This repo contains a little piece of code that I use for analysing .HAR files (network traffic record files). Usually, these files are used for performance analysis of the web pages, therefore all the other viewers didn't suit my needs to display the records in a tree-like fashion to see the relations between the elements of the webpages. And since I needed other features also, it didn't make sense to adapt any of the available tools.
This code visualizes the records by connecting together the Referer and Location HTTP headers to see the relations. Additionally, it can highlight URLs using EasyLists, it can fetch .HAR files automatically by using one of several engines, supports user-highlighting of records, storing them in a separate .hh files, does JS-beautifying and other little things useful for figuring out what's going on on a webpage.
The documentation is lacking a bit, but I believe everything can be figured out from the code (it's not big), if something is not mentioned in the docs (actually, the documentation is this README file and the ./HARtree.py --help
).
- python2
- Qt5
- PyQt5
- re2
- adblockparser
- browsermob-proxy
- selenium
- jsbeautifier
pip2 install -r optional-requirements.txt
Bunch of other stuff that is not documented (fetch engines along with their dependencies).
Note: The code is written like a python3 code, however the re2 module doesn't work on python3, so it is also written to be backwards-compatible with python2 and it currently works with python2 only (since it uses the aforementioned re2 module).
- PhantomJS and its examples/netsniff.js
- BrowserMob Proxy & Selenium
- HAR Export Trigger could also be used