抖音、云图、星图、巨量等滑块通用文章来源:https://www.toymoban.com/news/detail-685363.html
2023年3月份亲测好用,仅用于学习测试。文章来源地址https://www.toymoban.com/news/detail-685363.html
import os
import cv2
import requests
import numpy as np
from selenium import webdriver
from urllib.parse import urlparse
from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By
import time
def login(email, password):
driver_path = r'/usr/local/bin/chromedriver'
check_url = "https://xxxxxxxxxxxx/login"
options = webdriver.ChromeOptions()
options.add_experimental_option('useAutomationExtension', False)
options.add_experimental_option('excludeSwitches', ['enable-automation'])
# options.add_argument('--headless')
driver = webdriver.Chrome(chrome_options=options, executable_path=driver_path)
driver.execute_cdp_cmd("Page.addScriptToEvaluateOnNewDocument", {
"source": """
Object.defineProperty(navigator, 'webdriver', {
get: () => undefined
})
"""
})
# try:
driver.get(check_url)
driver.implicitly_wait(40)
time.sleep(2)
# 获取元素
driver.find_element(By.XPATH, '//*[@id="navbar"]/div/div[2]').click()
driver.find_element(By.XPATH, '/section/div[4]/div[1]/div/div/span/input').send_keys(
email)
driver.find_element(By.XPATH, '/section/div[4]/div[2]/div/div/span/input').send_keys(
password)
'''
print("QQ:", 417398600)
'''
到了这里,关于抖音、云图、星图、巨量等滑块验证(python+selenium)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!