python实现微信版呼死你(附源码)

#coding=utf-8
import datetime
import time
from selenium import webdriver
url="https://wx2.qq.com/?&lang=zh_CN"

browser = webdriver.Chrome()
browser.get("https://wx2.qq.com/?&lang=zh_CN")

time.sleep(13)

search=browser.find_element_by_xpath('//*[@id="search_bar"]/input')
search.send_keys('文件传输助手')
time.sleep(3)
item=browser.find_element_by_xpath('//*[@id="mmpop1"]/div/div[1]/div/div[3]/div/div/div[2]/h4')
item.click()

for i in range(2000000):

    textarea=browser.find_element_by_xpath('//*[@id="editArea"]')
    textarea.send_keys("停车坐爱枫林晚,霜叶红于二月花")
    submit=browser.find_element_by_xpath('//*[@id="chatArea"]/div[3]/div[3]/a')
    submit.click()
    time.sleep(1)
    textarea.send_keys("多么野性十足的野菊花啊!你不得不感叹她的执着狂放,那种感动天地的对生命的怒放。我已经找不到更精美的文字来表述。如果可以如人那样,用季节来算年龄,那么,野菊花开在万物即将枯萎的深秋,就应该算是人的不惑之年了。可是,她们没有因为季节的迟来,而怠慢自己。开着,就尽情地开放,无需去管花大花小,也无需去管天地是否容纳。")
    submit=browser.find_element_by_xpath('//*[@id="chatArea"]/div[3]/div[3]/a')

    submit.click()
    time.sleep(1)


time.sleep(55);
browser.quit();

打赏作者:

猜你喜欢

转载自blog.csdn.net/taotaobaobei/article/details/82850501