aboutsummaryrefslogtreecommitdiffstats
path: root/har2kml
diff options
context:
space:
mode:
Diffstat (limited to 'har2kml')
-rwxr-xr-xhar2kml10
1 files changed, 7 insertions, 3 deletions
diff --git a/har2kml b/har2kml
index b95cd02..5c3c5f2 100755
--- a/har2kml
+++ b/har2kml
@@ -10,13 +10,17 @@ else
fi
har2hosts() {
- jq -r '.log | .entries | map(.request) | map(.url) | join("\n")' < $har |
+ jq -r '.log | .entries | map(.request) | map(.url) | join("\n")' < $har | grep ^http |
cut -d/ -f3 | sort -u
}
+if [ ! -d cache ] ; then mkdir cache ; fi
+
for h in $(har2hosts) ; do
- kml="$h.kml"
- curl -s "https://www.geotraceroute.com/petter.php?host=$h" > "$kml"
+ kml="cache/$h.kml"
+ if [ ! -f "$kml" ] ; then
+ curl -s "https://www.geotraceroute.com/petter.php?host=$h" > "$kml"
+ fi
kmls="$kmls $kml"
done