https://github.com/cqsupport/har-utils
Utilities for reading and comparing har files.
https://github.com/cqsupport/har-utils
comparing-har-files diff har har-utils json python
Last synced: 3 months ago
JSON representation
Utilities for reading and comparing har files.
- Host: GitHub
- URL: https://github.com/cqsupport/har-utils
- Owner: cqsupport
- License: apache-2.0
- Created: 2019-03-29T20:31:32.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-05-11T20:22:16.000Z (about 5 years ago)
- Last Synced: 2025-01-08T18:11:59.749Z (over 1 year ago)
- Topics: comparing-har-files, diff, har, har-utils, json, python
- Language: Python
- Size: 10.7 KB
- Stars: 1
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# har-utils
Utilities for reading and comparing har files.
# generate-checksums-for-diff.py
Generates output in this format:
```
[url with scheme host and port removed] [tab] [md5 hash of http response body]
```
For example:
```
/foo.html a4e04598ef3db4cacc029d6b4340e479
```
Note: It also includes a regular expression replacement on the URL that removes querystring params like _ck=1553892021 or _=1553892021. Querystring parameters like these are used by AEM as "cache killers" to avoid browser caching. This makes diff'ing the file against ones captured from other AEM instances easier to do.
Example usage:
```
python generate-checksums-for-diff.py path/to/harfile1.har | sort > harfile1_sorted.txt
python generate-checksums-for-diff.py path/to/harfile2.har | sort > harfile2_sorted.txt
diff harfile1_sorted.txt harfile2_sorted.txt
```