from selenium import webdriver
import time
driver = webdriver.Chrome()
url = "https://www.baidu.com"
driver.get(url)
time.sleep(3)
这是批量删除
driver.execute_script("var data=document.querySelectorAll('a[name="tj_briicon"]').forEach(v=>v.remove())")
这是删除某一个
driver.execute_script("var data=document.querySelector('a[name="tj_briicon"]').remove()")