Skip to content

Commit 174a583

Browse files
committed
chg: Improve debugging options
1 parent a17b96e commit 174a583

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

har2tree/har2tree.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -822,8 +822,9 @@ def _make_subtree_fallback(self, node: URLNode, dev_debug: bool=False) -> None:
822822
def all_real_urls_in_children(self, frame: FramesResponse) -> Iterator[str]:
823823
# from a frame, search all the real urls in each of the children, stop at the first one
824824
if (frame.get('url') and frame['url'] is not None
825-
and not (frame['url'] in ['about:blank'] # not loading anything, same as empty
825+
and not (frame['url'] in ['about:blank', 'about:srcdoc'] # not loading anything, same as empty
826826
or frame['url'].startswith('data') # base64 encoded content
827+
or frame['url'].startswith('chrome-error') # not in the HAR/tree
827828
or frame['url'].startswith('blob'))): # blobs aren't URLs
828829
yield frame['url']
829830
else:
@@ -920,7 +921,8 @@ def _make_subtree(self, root: URLNode, nodes_to_attach: list[URLNode] | None=Non
920921
cu = unquote_plus(possible_url)
921922
for u in {cu, cu.split('#', 1)[0]}:
922923
if u not in self.all_url_requests:
923-
self.logger.info(f'"{u}" in the frames URLs, but not in the HAR.')
924+
if '#' not in u:
925+
self.logger.info(f'"{u}" in the frames URLs, but not in the HAR.')
924926
continue
925927
matching_urls = [url_node for url_node in self.all_url_requests[u]
926928
if url_node in self._nodes_list]

0 commit comments

Comments
 (0)