抖音、云图、星图、巨量等滑块通用
2023年3月份亲测好用,仅用于学习测试。
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
deflogin(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)
'''
本文转载自: https://blog.csdn.net/m0_47213847/article/details/129691815
版权归原作者 郭杠 所有, 如有侵权,请联系我们删除。
版权归原作者 郭杠 所有, 如有侵权,请联系我们删除。