Python 我需要点击quora上的一个按钮,但不知道怎么做

Python 我需要点击quora上的一个按钮,但不知道怎么做,python,button,buttonclick,quora,Python,Button,Buttonclick,Quora,我想让机器人在quora上回答问题。但是在创建这个时,我遇到了一个问题,单击“答案”按钮。这就是行不通。有人给你一些建议吗?你可以使用selenium在python中单击一个按钮 示例: 从selenium导入webdriver driver=webdriver.Chrome(Chrome\u options=options) 司机,上车http://codepad.org') python\u button=driver。通过xpath(//input[@name='lang'和@value=

我想让机器人在quora上回答问题。但是在创建这个时,我遇到了一个问题,单击“答案”按钮。这就是行不通。有人给你一些建议吗?

你可以使用
selenium
在python中单击一个按钮

示例:

从selenium导入webdriver
driver=webdriver.Chrome(Chrome\u options=options)
司机,上车http://codepad.org')
python\u button=driver。通过xpath(//input[@name='lang'和@value='python'])查找元素[0]
python_按钮。单击()
希望它有用

编辑:

您可以通过从控制台复制元素(在检查元素时)来获取元素的XPath


是的,我找到了这个,但不知道把什么放在哪里。