Commit c077ada2 authored by liyang's avatar liyang

fix:爬取数据入库

parent ab28d119
...@@ -156,15 +156,15 @@ def reptile(browser=None, search_word=""): ...@@ -156,15 +156,15 @@ def reptile(browser=None, search_word=""):
} }
# --------------- 组装数据 end--------------------- # --------------- 组装数据 end---------------------
# data.append(obj)
# 使用正则表达式进行匹配
matches = re.findall(search_word, element_title.text)
# 打印匹配结果
if matches:
# log.debug(f"找到了匹配的字符串:{matches}")
data.append(obj) 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() browser.back()
......
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