aboutsummaryrefslogtreecommitdiffstats
path: root/examples/har_extractor.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@corte.si>2016-06-14 16:29:15 +1200
committerGitHub <noreply@github.com>2016-06-14 16:29:15 +1200
commit93276d45be68790b5f4aeb4577c380ca1608efb3 (patch)
tree9553d0f45e705da04bfa4be8dd5e39d09fcd112f /examples/har_extractor.py
parent4c292b0197d820e9e108aa05b10927107a0503c3 (diff)
parentd8ae2f156203a81a8e6d325f5c460c351cfbfc5c (diff)
downloadmitmproxy-93276d45be68790b5f4aeb4577c380ca1608efb3.tar.gz
mitmproxy-93276d45be68790b5f4aeb4577c380ca1608efb3.tar.bz2
mitmproxy-93276d45be68790b5f4aeb4577c380ca1608efb3.zip
Merge branch 'master' into netlibrace
Diffstat (limited to 'examples/har_extractor.py')
-rw-r--r--examples/har_extractor.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/har_extractor.py b/examples/har_extractor.py
index 6806989d..c21f1a8f 100644
--- a/examples/har_extractor.py
+++ b/examples/har_extractor.py
@@ -3,6 +3,7 @@
https://github.com/JustusW/harparser to generate a HAR log object.
"""
import six
+import sys
from harparser import HAR
from datetime import datetime
@@ -52,15 +53,15 @@ class _HARLog(HAR.log):
return self.__page_list__
-def start(context, argv):
+def start(context):
"""
On start we create a HARLog instance. You will have to adapt this to
suit your actual needs of HAR generation. As it will probably be
necessary to cluster logs by IPs or reset them from time to time.
"""
context.dump_file = None
- if len(argv) > 1:
- context.dump_file = argv[1]
+ if len(sys.argv) > 1:
+ context.dump_file = sys.argv[1]
else:
raise ValueError(
'Usage: -s "har_extractor.py filename" '