Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/328.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 使用heroku中的seleniun登录gmail_Python_Selenium_Selenium Webdriver_Heroku_Automation - Fatal编程技术网

Python 使用heroku中的seleniun登录gmail

Python 使用heroku中的seleniun登录gmail,python,selenium,selenium-webdriver,heroku,automation,Python,Selenium,Selenium Webdriver,Heroku,Automation,我正在编写一个python程序来删除来自同一用户的大量电子邮件,为此我使用selenium作为一个自动化程序,并在heroku中托管该程序 问题是,当我在我的电脑上登录gmail时,它工作正常,当我从selenium尝试它时,它给我一个错误,说它找不到电子邮件输入字段 注意:为了让selenium在heroku上工作,我使用了这个 这是我的密码 从selenium导入webdriver 从selenium.webdriver.common.keys导入密钥 导入时间 driver=webdriv

我正在编写一个python程序来删除来自同一用户的大量电子邮件,为此我使用selenium作为一个自动化程序,并在heroku中托管该程序 问题是,当我在我的电脑上登录gmail时,它工作正常,当我从selenium尝试它时,它给我一个错误,说它找不到电子邮件输入字段

注意:为了让selenium在heroku上工作,我使用了这个

这是我的密码

从selenium导入webdriver
从selenium.webdriver.common.keys导入密钥
导入时间
driver=webdriver.Chrome('chromedriver.exe')
驱动程序。最大化_窗口()
司机,上车https://accounts.google.com/signin/v2/identifier?continue=https%3A%2F%2Fmail.google.com%2Fmail%2F&service=mail&sacu=1&rip=1&flowName=GlifWebSignIn&flowEntry=ServiceLogin')
驱动程序。通过id('identifierId')查找元素。发送密钥('gpt。sahaj28@gmail.com“)#以下是heroku发生错误的时间
驱动程序。通过类名称(“CwaK9”)查找元素。单击()
在heroku出现最后一行错误,因为它在pc中工作正常


我似乎无法解决问题,所以我强烈建议不要使用selenium删除用户的电子邮件,因为这可能违反Gmail的使用条款和隐私政策。我建议更多的是用来管理用户的电子邮件。希望这能有所帮助。

因此我强烈建议不要使用selenium删除用户的电子邮件,因为这可能违反Gmail的使用条款和隐私政策。我建议更多的是用来管理用户的电子邮件。希望这能有所帮助。

即使我正在从自己的gmail中删除电子邮件?即使我正在从自己的gmail中删除电子邮件?gmail正在阻止自动脚本的访问,请参阅:gmail正在阻止自动脚本的访问,请参阅: