Skip to content

Commit

Permalink
Merge 3ccb2b2 into 0234550
Browse files Browse the repository at this point in the history
  • Loading branch information
gowthamraj198 committed Oct 5, 2019
2 parents 0234550 + 3ccb2b2 commit 82091a3
Show file tree
Hide file tree
Showing 3 changed files with 625 additions and 0 deletions.
20 changes: 20 additions & 0 deletions haralyzer/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,26 @@ def actual_page(self):
entry['response']['status'] <= 399):
return entry

@cached_property
def duplicate_url_request(self):
"""
Returns a list of urls that are sent more than once
"""

urls = {}
url_list = []
for entry in self.entries:
url = entry.get('request').get('url')
if urls.get(url) is None:
urls.update({url: 1})
else:
urls.update({url: urls.get(url) + 1})

for url, count in urls.items():
if count > 1:
url_list.append(url)
return url_list

# Convenience properties. Easy accessible through the API, but even easier
# to use as properties
@cached_property
Expand Down

0 comments on commit 82091a3

Please sign in to comment.