diff --git a/DrissionPage/_elements/chromium_element.py b/DrissionPage/_elements/chromium_element.py index 1eb34e9..9f54e66 100644 --- a/DrissionPage/_elements/chromium_element.py +++ b/DrissionPage/_elements/chromium_element.py @@ -130,7 +130,10 @@ class ChromiumElement(DrissionElement): self.__tree(ele=self) def __tree(self,ele, layer=5, last_one=False, body=''): - list_ele = ele.children(timeout=0.1) + try: + list_ele = ele.children(timeout=0.1) + except: + list_ele = [] length = len(list_ele) body_unit = ' ' if last_one else '│ ' tail = '├───'