Commit e0e2587f authored by JinyinQiao's avatar JinyinQiao

Merge branch 'dev-liyang' of http://39.105.40.203/liyang/network-assets-reptile into dev-liyang

parents f321ea01 3769935a
......@@ -120,14 +120,20 @@ def reptile(browser=None, search_word=""):
"link": browser_current_url,
"reptileTime": str(int(time.time()))
}
# 使用正则表达式进行匹配
matches = re.findall(search_word, element_title.text)
# 打印匹配结果
if matches:
# log.debug(f"找到了匹配的字符串:{matches}")
# ------------------------------------------------------
data.append(obj)
else:
log.debug("未找到匹配的字符串")
# # 使用正则表达式进行匹配
# matches = re.findall(search_word, element_title.text)
# # 打印匹配结果
# if matches:
# # log.debug(f"找到了匹配的字符串:{matches}")
# data.append(obj)
# else:
# log.debug("未找到匹配的字符串")
# ------------------------------------------------------
# 浏览器返回上一页
browser.back()
element_list = browser.find_elements('xpath', "//div[@class='r-ent']//div[@class='title']//a")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment