Selenium analog search I search is always unable to locate the label, no problem.

class qichacha:
     def __init__(self):
         option = webdriver.ChromeOptions()
         option.add_argument("--start-maximized")  -sharp 
         option.add_argument("--headless")  -sharp 
         self.driver = webdriver.Chrome(chrome_options=option)
         self.serarch_engine_url="https://www.qichacha.com/"
         self.csv_file = os.getcwd() +"/"+"data.csv"
     def search_index(self):

         self.driver.get("https://www.qichacha.com/")
         response = self.driver.page_source.encode("utf-8")
         print(response)
         self.driver.find_element_by_id("searchkey").send_keys("")

         self.driver.find_element_by_id("V3_Search_bt").click()

         response=self.driver.page_source.encode("utf-8")
         
       
         

clipboard.png

Mar.18,2021

the tag you want to locate should be generated asynchronously through js, so you can't locate it. Try it for a while

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36d9d-2c075.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36d9d-2c075.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?