mirror of
https://github.com/Kr1s77/awesome-python-login-model.git
synced 2026-10-29 03:16:31 +08:00
bilibili 防封号
This commit is contained in:
@@ -27,10 +27,14 @@ class BiliBili():
|
||||
"""
|
||||
初始化
|
||||
"""
|
||||
self.browser = webdriver.Chrome()
|
||||
options = webdriver.ChromeOptions()
|
||||
# 设置为开发者模式,避免被识别
|
||||
options.add_experimental_option('excludeSwitches',
|
||||
['enable-automation'])
|
||||
self.browser = webdriver.Chrome(options=options)
|
||||
self.url = 'https://passport.bilibili.com/login'
|
||||
self.browser.get(self.url)
|
||||
self.wait = WebDriverWait(self.browser, 5)
|
||||
self.wait = WebDriverWait(self.browser, 5, 0.2)
|
||||
self.username = username
|
||||
self.password = password
|
||||
|
||||
|
||||
Reference in New Issue
Block a user