最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

墊的腳本開源,懶得寫自動登錄了,用pycharm運行即可

2023-04-01 14:19 作者:柚さぎ-yosagi  | 我要投稿

# encoding = utf-8
from selenium import webdriver
from selenium.webdriver.common.by import By
import unittest
import time


class Search_KeyWords(unittest.TestCase):
? ?def setUp(self):
? ? ? ?self.driver = webdriver.Firefox()
? ? ? ?self.driver.implicitly_wait(30)
? ? ? ?self.url = "https://live.bilibili.com/26532808?broadcast_type=0&;is_room_feed=1&spm_id_from=333.999.to_liveroom.0.click&live_from=86002"
? ?def test_search_davieyang(self):
? ? ? ?driver = self.driver
? ? ? ?driver.get(self.url)
? ? ? ?time.sleep(30)
? ? ? ?# driver.find_element(By.ID,'kw').clear()
? ? ? ?while True :
? ? ? ? ? ?driver.find_element(by="xpath",
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?value="/html/body/div[3]/main/div[1]/section[1]/div[3]/div[11]/div/div[2]/div[2]/textarea").send_keys("柚子")
? ? ? ? ? ?# driver.find_element(By.ID,'kw').send_keys('haoyun')
? ? ? ? ? ?driver.find_element(by="xpath",
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?value="/html/body/div[3]/main/div[1]/section[1]/div[3]/div[11]/div/div[3]/div/button/span").click()
? ? ? ? ? ?time.sleep(5)
? ? ? ? ? ?driver.find_element(by="xpath",
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?value="/html/body/div[3]/main/div[1]/section[1]/div[3]/div[11]/div/div[2]/div[2]/textarea").send_keys("是墊的")
? ? ? ? ? ?# driver.find_element(By.ID,'kw').send_keys('haoyun')
? ? ? ? ? ?driver.find_element(by="xpath",
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?value="/html/body/div[3]/main/div[1]/section[1]/div[3]/div[11]/div/div[3]/div/button/span").click()
? ? ? ? ? ?time.sleep(5)
? ? ? ? ? ?driver.find_element(by="xpath",
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?value="/html/body/div[3]/main/div[1]/section[1]/div[3]/div[11]/div/div[2]/div[2]/textarea").send_keys("柚子")
? ? ? ? ? ?# driver.find_element(By.ID,'kw').send_keys('haoyun')
? ? ? ? ? ?driver.find_element(by="xpath",
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?value="/html/body/div[3]/main/div[1]/section[1]/div[3]/div[11]/div/div[3]/div/button/span").click()
? ? ? ? ? ?time.sleep(5)
? ? ? ? ? ?driver.find_element(by="xpath",
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?value="/html/body/div[3]/main/div[1]/section[1]/div[3]/div[11]/div/div[2]/div[2]/textarea").send_keys("是墊的")
? ? ? ? ? ?# driver.find_element(By.ID,'kw').send_keys('haoyun')
? ? ? ? ? ?driver.find_element(by="xpath",
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?value="/html/body/div[3]/main/div[1]/section[1]/div[3]/div[11]/div/div[3]/div/button/span").click()
? ? ? ? ? ?time.sleep(5)
? ? ? ? ? ?driver.find_element(by="xpath",
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?value="/html/body/div[3]/main/div[1]/section[1]/div[3]/div[11]/div/div[2]/div[2]/textarea").send_keys("柚子是墊的")
? ? ? ? ? ?# driver.find_element(By.ID,'kw').send_keys('haoyun')
? ? ? ? ? ?driver.find_element(by="xpath",
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?value="/html/body/div[3]/main/div[1]/section[1]/div[3]/div[11]/div/div[3]/div/button/span").click()
? ? ? ? ? ?time.sleep(5)
? ? ? ? ? ?driver.find_element(by="xpath",
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?value="/html/body/div[3]/main/div[1]/section[1]/div[3]/div[11]/div/div[2]/div[2]/textarea").send_keys("柚子是墊的")
? ? ? ? ? ?# driver.find_element(By.ID,'kw').send_keys('haoyun')
? ? ? ? ? ?driver.find_element(by="xpath",
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?value="/html/body/div[3]/main/div[1]/section[1]/div[3]/div[11]/div/div[3]/div/button/span").click()
? ? ? ? ? ?time.sleep(5)
? ? ? ? ? ?driver.find_element(by="xpath",
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?value="/html/body/div[3]/main/div[1]/section[1]/div[3]/div[11]/div/div[2]/div[2]/textarea").send_keys("墊的墊的墊的墊的")
? ? ? ? ? ?# driver.find_element(By.ID,'kw').send_keys('haoyun')
? ? ? ? ? ?driver.find_element(by="xpath",
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?value="/html/body/div[3]/main/div[1]/section[1]/div[3]/div[11]/div/div[3]/div/button/span").click()
? ? ? ? ? ?time.sleep(5)
? ? ? ? ? ?driver.find_element(by="xpath",
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?value="/html/body/div[3]/main/div[1]/section[1]/div[3]/div[11]/div/div[2]/div[2]/textarea").send_keys("柚子是墊的")
? ? ? ? ? ?# driver.find_element(By.ID,'kw').send_keys('haoyun')
? ? ? ? ? ?driver.find_element(by="xpath",
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?value="/html/body/div[3]/main/div[1]/section[1]/div[3]/div[11]/div/div[3]/div/button/span").click()
? ? ? ? ? ?time.sleep(5)
? ? ? ? ? ?driver.find_element(by="xpath",
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?value="/html/body/div[3]/main/div[1]/section[1]/div[3]/div[11]/div/div[2]/div[2]/textarea").send_keys("???這下你們滿意了吧")
? ? ? ? ? ?# driver.find_element(By.ID,'kw').send_keys('haoyun')
? ? ? ? ? ?driver.find_element(by="xpath",
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?value="/html/body/div[3]/main/div[1]/section[1]/div[3]/div[11]/div/div[3]/div/button/span").click()
? ? ? ? ? ?time.sleep(5)



? ? ? ?# try:
? ? ? ?# ? ? self.assertTrue("haoyun" in driver.page_source)
? ? ? ?# except AssertionError as e:
? ? ? ?# ? ? raise e
? ?# def test_search_selenium(self):
? ?# ? ? driver = self.driver
? ?# ? ? driver.get(self.url)
? ?# ? ? driver.find_element(By.ID, 'kw').clear()
? ?# ? ? driver.find_element(By.ID, 'kw').send_keys('haoyun')
? ?# ? ? driver.find_element(By.ID, 'su').click()
? ?# ? ? time.sleep(3)
? ?# ? ? try:
? ?# ? ? ? ? self.assertTrue("hao" in driver.page_source)
? ?# ? ? except AssertionError as e:
? ?# ? ? ? ? raise e
? ?def tearDown(self):
? ? ? ?self.driver.quit()

if __name__ == "__main__":
? ?suite = unittest.TestSuite()
? ?suite.addTest(Search_KeyWords('test_search_davieyang'))
? ?# suite.addTest(Search_KeyWords('test_search_selenium'))
? ?runner = unittest.TextTestRunner()
? ?runner.run(suite)
# 斷言的結(jié)果是否出現(xiàn)在源代碼中

墊的腳本開源,懶得寫自動登錄了,用pycharm運行即可的評論 (共 條)

分享到微博請遵守國家法律
卢龙县| 隆子县| 定州市| 河间市| 浦东新区| 西充县| 上林县| 海丰县| 北碚区| 余江县| 屏山县| 遂川县| 长武县| 肥西县| 禄劝| 荔浦县| 绥滨县| 陆丰市| 黄龙县| 马关县| 外汇| 克什克腾旗| 密山市| 徐水县| 沂南县| 龙里县| 读书| 屯留县| 讷河市| 达拉特旗| 桦南县| 高台县| 玛沁县| 潮安县| 瑞丽市| 荣昌县| 团风县| 昆山市| 苍溪县| 兴山县| 彭泽县|