修改str_to_loc()不传入内容时逻辑

This commit is contained in:
g1879 2021-12-17 17:11:30 +08:00
parent 783df77782
commit 4c0d08e822

View File

@ -148,7 +148,7 @@ def str_to_loc(loc: str) -> tuple:
elif loc:
loc_str = f'//*/text()[contains(., {_make_search_str(loc)})]/..'
else:
loc_str = '//*[not(text())]'
loc_str = '//*'
return loc_by, loc_str