from selenium import webdriver
from selenium.webdriver.common.by import By
import time
chrome_driver = r'C:\Users\P72\Desktop\chromedriver.exe' #chromedriver的文件位置
driver = webdriver.Chrome()
driver.get('https://live.bilibili.com/xxxxxx')
start=time.time()
time.sleep(25) #這里設(shè)置的是等待多少秒,也就是瀏覽器等待你登錄
insertButton = driver.find_element(By.XPATH, '//*[@id="control-panel-ctnr-box"]/div[2]/div[2]/textarea')
sendButton = driver.find_element(By.XPATH, '//*[@id="control-panel-ctnr-box"]/div[3]/div/button/span')
try:
time.sleep(1)
insertButton.click()
time.sleep(1)
insertButton.send_keys('摸魚')
sendButton.click()
while True:
insertButton.click()
insertButton.send_keys('摸')
sendButton.click()
time.sleep(60)
# break
# driver.refresh() #先刷新界面
# driver.delete_all_cookies()
# cookies=driver.get_cookies()
# print(cookies) #獲得cookie并打印
# for cookie in cookies:
# cookie_dict = {
# 'domain': cookie.get('domain'), # 這里是固定的每個(gè)網(wǎng)站都不同
# 'name': cookie.get('name'),
# 'value': cookie.get('value'),
# "expires": cookie.get('expiry', 0),
# 'path': '/',
# 'httpOnly': cookie.get('httpOnly'),
# 'HostOnly': False,
# 'Secure': cookie.get('secure')
# }
# driver.add_cookie(cookie_dict)
# driver.refresh() #帶著cookie重新加載
# time.sleep(5)
#
except Exception as e:
print(e)
小破站漁場自動(dòng)摸魚
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。
相關(guān)閱讀更多精彩內(nèi)容
- 距離2019年最后一天,已經(jīng)過去了10天了。 而在B站2019晚會(huì)《2019最美的夜》播出的后兩天,B站股票暴漲1...
- 記觀看B站2020年跨年一則 一直被朋友推薦看b站跨年,今天終于有時(shí)間看了,真的震撼到了。 1.朱廣權(quán)主持,讓手語...
- 站童年看過數(shù)碼寶貝一定不能錯(cuò)過了,我要是女生估計(jì)要淚目。 看到片尾剩我一人。 結(jié)局并沒有彩蛋和反轉(zhuǎn),很現(xiàn)實(shí),我們已...
- 從年前備受好評(píng)的跨年晚會(huì),到前段時(shí)間刷爆朋友圈以及登上央視廣告的《后浪》, B站真是一次又一次的大手筆! 第一,B...
- 大家好,我是阿聊 今天有個(gè)熱門話題是#B站將離世用戶賬號(hào)列為紀(jì)念賬號(hào)#,引起了大家的強(qiáng)烈討論。 12月24日午間消...