MCPcopy Create free account
hub / github.com/THUDM/AutoWebGLM / get_segment

Method get_segment

miniwob++/html_tools/html_parser.py:392–398  ·  view source on GitHub ↗
(self, bid: str)

Source from the content-addressed store, hash-verified

390 self.dom_tree = new_tree
391
392 def get_segment(self, bid: str) -> str:
393 # clone the tree
394 new_tree = copy.deepcopy(self.dom_tree)
395 nodes_to_keep = self.get_keep_elements(new_tree, [bid], 0, 2, 1)
396 new_tree = self.prune(new_tree, nodes_to_keep)
397 dom, _ = self.parse(new_tree, self.keep, [], False)
398 return dom

Callers 1

policyMethod · 0.95

Calls 3

get_keep_elementsMethod · 0.95
pruneMethod · 0.95
parseMethod · 0.95

Tested by

no test coverage detected