Commit f71f84a0 authored by liyang's avatar liyang

fix:ptt 加速

parent 9ea6170b
......@@ -47,14 +47,18 @@ def reptile(browser=None, search_word=""):
# 暂时先爬取 第2个 分类
if 0 <= index < 4:
type_title = classify_item_list[index].text
# 进入分类页面
classify_item_list[index].click()
time.sleep(0.1)
# 综合分类需要确认已满18周岁
if index == 0:
try:
button = browser.find_element("xpath", "//form/div[1]//button")
button.click()
except:
error = ""
wait = WebDriverWait(browser, 10)
wait.until(EC.presence_of_element_located((By.XPATH, "//div[@class='r-ent']")))
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