diff options
Diffstat (limited to 'examples/har_extractor.py')
-rw-r--r-- | examples/har_extractor.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/har_extractor.py b/examples/har_extractor.py index 371e2282..6806989d 100644 --- a/examples/har_extractor.py +++ b/examples/har_extractor.py @@ -162,8 +162,11 @@ def response(context, flow): # If the current url is in the page list of context.HARLog or # does not have a referrer, we add it as a new pages object. - if (flow.request.url in context.HARLog.get_page_list() or - flow.request.headers.get('Referer') is None): + is_new_page = ( + flow.request.url in context.HARLog.get_page_list() or + flow.request.headers.get('Referer') is None + ) + if is_new_page: page_id = context.HARLog.create_page_id() context.HARLog.add( HAR.pages({ |