管理人员请勿观看

感觉写成屎山效果更好

我不是管理人员
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from random import randint
your_email = 'your_email'
your_password = 'your_password'
driver = webdriver.Chrome()
driver.get('https://linux.do/c/gossip/11') 
login_button = WebDriverWait(driver, 10).until(
    EC.element_to_be_clickable((By.CSS_SELECTOR, ".login-button"))
)
login_button.click()
WebDriverWait(driver, 10).until(
    EC.visibility_of_element_located((By.ID, "login-account-name"))
).send_keys(your_email)
driver.find_element(By.ID, "login-account-password").send_keys(your_password)
WebDriverWait(driver, 10).until(
    EC.element_to_be_clickable((By.ID, "login-button"))
).click()
topic_title = str(randint(10000000,99999999))
topic_content = str(randint(10000000,99999999))
create_topic_button = WebDriverWait(driver, 10).until(
    EC.element_to_be_clickable((By.ID, "create-topic"))
)
create_topic_button.click()
WebDriverWait(driver, 10).until(
    EC.visibility_of_element_located((By.ID, "reply-title"))
).send_keys(topic_title)
driver.find_element(By.CSS_SELECTOR, "textarea.ember-text-area").send_keys(topic_content)
WebDriverWait(driver, 10).until(
    EC.element_to_be_clickable((By.CSS_SELECTOR, "button.btn-primary.create"))
).click()


1 个赞

模拟鼠标是吧

常规话题病友

行走的徽章

4 个赞

徽章到账

爷们,冲哇:star_struck:,徽章来啦

始皇好像每个帖子都看哦 :smiling_face_with_three_hearts:

撒泡尿标记一处地点。。

行走的徽章啥意思吗

我也标记马克一下

写得不错,先举报了

好好好,自动登录也来了

aha, nice script

不明觉厉

好好好 此地无银三百两

你可真是太棒了:joy:

666

有什么好事 :smile:

好!

连着刷到二个类似的帖子,难道是是海纳百川徽章的缘故 :rofl: