i want to write comment on some posts with selenium with python.
here is my code========================================
html=driver.page_source soup=BeautifulSoup(html,"html.parser") input=soup.find_element_by_css_selector("body > div._2dDPU.CkGkG > div.zZYga > div > article > div.eo2As > section.sH9wk._JgwE > div > form > textarea) input.clear() input.send_keys("blahblah") input.submit()
here is the error message------------------------------------- TypeError Traceback (most recent call last) in ----> 1 input=soup.find_element_by_css_selector("body > div._2dDPU.CkGkG > div.zZYga > div > article > div.eo2As > section.sH9wk._JgwE > div > form > textarea") 2 input.clear()
TypeError: 'NoneType' object is not callable
https://stackoverflow.com/questions/65746096/how-to-send-keys-to-textarea-with-selenium-python January 16, 2021 at 11:05AM
没有评论:
发表评论