Commit e4bb3dae authored by liyang's avatar liyang

feat:dcard debug

parent 3741efa0
......@@ -41,8 +41,8 @@ def reptile(browser=None, search_word=""):
time.sleep(6)
# 滚动一页
# 使用 JavaScript 将网页滚动到底部
browser.execute_script("window.scrollTo(0, document.body.scrollHeight);")
time.sleep(3)
# browser.execute_script("window.scrollTo(0, document.body.scrollHeight);")
# time.sleep(6)
base_xpath = "//div[@role='main']//div[@data-key]//article"
# 内容块
element_content_list = browser.find_elements('xpath', base_xpath)
......
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