diff --git a/har_parser.py b/har_parser.py index fcd249b..e3603d1 100644 --- a/har_parser.py +++ b/har_parser.py @@ -16,12 +16,21 @@ def main(): print("Files found in the HAR archive:") for entry in entries: + response = entry.get('response', {}) + content = response.get('content', {}) + mime_type = content.get('mimeType', '') + + if not mime_type.startswith('image/'): + continue + request = entry.get('request', {}) url = request.get('url') if url: print(url) else: - print("Entry found with no request URL.") + # This case might be less likely if we are filtering by mimeType, + # but kept for robustness if an image entry somehow lacks a URL. + print("Image entry found with no request URL.") if __name__ == "__main__":