由于Google拒绝除已成立公司之外的所有公司访问Google
MyBusiness的API密钥,因此我尝试使用seleniumwebdriver自动执行更改我的业务信息的过程。
什么有效?
通过自动执行登录表单登录到Google Mybusiness。
什么不起作用?
登录后,我需要打开编辑工作时间的小模式。我试图自动单击“编辑”按钮,但不幸的是,出现此错误:http.client.RemoteDisconnected: Remote end closed connection without response
我的代码:
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument("start-maximized")
driver = webdriver.Chrome(chrome_options=options)
def LoginGMB(driver):
(myemail, mypassword) = AuthenticationDetails()
driver.find_element_by_id('identifierId').send_keys(myemail)
driver.find_element_by_id('identifierNext').click()
time.sleep(2)
driver.find_element_by_name('password').send_keys(mypassword)
driver.find_element_by_id('passwordNext').click()
time.sleep(2)
def OpenGMB(url):
driver.get(url)
print(driver.current_url)
pattern = re.compile(".*accounts.google.com/signin.*")
match = re.search(pattern, cururl)
if match:
LoginGMB(driver)
print("Ok we're back")
driver.find_element_by_id('ow50').click()
OpenGMB('https://business.google.com/edit/l/001?hl=en')
堆栈跟踪:
https://accounts.google.com/signin/v2/identifier?service=lbc&passive=1209600&continue
We need to login as we are presented login page
Ok we're back
Traceback (most recent call last):
File "/home/joel/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/home/joel/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 384, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/home/joel/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 380, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.6/http/client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "gmb.py", line 77, in <module>
OpenGMB(url)
File "gmb.py", line 62, in OpenGMB
el = driver.find_element_by_id('ow50')
File "/home/joel/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 360, in find_element_by_id
return self.find_element(by=By.ID, value=id_)
File "/home/joel/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 978, in find_element
'value': value})['value']
File "/home/joel/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 319, in execute
response = self.command_executor.execute(driver_command, params)
File "/home/joel/.local/lib/python3.6/site-packages/selenium/webdriver/remote/remote_connection.py", line 376, in execute
return self._request(command_info[0], url, body=data)
File "/home/joel/.local/lib/python3.6/site-packages/selenium/webdriver/remote/remote_connection.py", line 399, in _request
resp = self._conn.request(method, url, body=body, headers=headers)
File "/home/joel/.local/lib/python3.6/site-packages/urllib3/request.py", line 72, in request
**urlopen_kw)
File "/home/joel/.local/lib/python3.6/site-packages/urllib3/request.py", line 150, in request_encode_body
return self.urlopen(method, url, **extra_kw)
File "/home/joel/.local/lib/python3.6/site-packages/urllib3/poolmanager.py", line 323, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File "/home/joel/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/home/joel/.local/lib/python3.6/site-packages/urllib3/util/retry.py", line 367, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/home/joel/.local/lib/python3.6/site-packages/urllib3/packages/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/home/joel/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/home/joel/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 384, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/home/joel/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 380, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.6/http/client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
这些错误消息…
RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
和
RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
…表示由于 ProtocolError* 导致 远程连接 已断开。 *
根据urllib3.exceptions.ProtocolError:(’Connection
aborted。’,error(10054,’现有的连接被远程主机强行关闭’)))当您的二进制版本之间 不兼容
时,此问题非常明显正在使用。
在使用 ChromeDriver 和 Chrome浏览器时 ,必须确保二进制文件与以下条目兼容:
注意 :几个月前, Chromium小组
宣布了ChromeDriver的版本控制模型将发生变化的初步声明。现在我们正在推进该计划。具体来说,ChromeDriver
2.46将是包含主要版本2的最新版本。未来的ChromeDriver版本将具有与Chrome版本类似的版本号。我们将从下周的ChromeDriver
73版本开始,而不是Beta版本的Chrome 73。
这是新发行模型的工作方式:
我正在尝试连接到SOAPendpoint。 使用上面的方法,我不断得到下面的错误 java.lang.Thread.run(未知来源)[na: 1.8。0_191]原因:com.sun.xml.messaging.saaj.SOAPExceptionImpl:消息发送失败com.sun.xml.messaging.saaj.client.p2p。HttpSOAPConnection.post(Ht
感谢您抽出时间阅读我的问题-我正在使用EclipseIDE。我希望Jsoup连接https url-https://www.icegate.gov.in/使用 但它在线程“main”javax中给出了错误,而当我对其他https(如linkedin)使用相同的代码时,它就工作了。。。我不知道如何解决这个问题。 我获得了该网站的证书,并安装在我的jre/lib/security文件夹中,但它对我也没
编辑问题以包含所需的行为、特定问题或错误以及重现问题所需的最短代码。这将帮助其他人回答问题。 我有一个nodejs客户端,它使用bramqp连接到RabbitMQ服务器。我的客户端可以连接到localhost中的Rabbit MQ服务器,运行良好。但它无法连接到另一台机器上的远程RabbitMQ服务器。我在远程服务器中打开了端口5672,因此我认为问题在于rabbitMQ服务器的配置。我如何解决这
我在远程机器上使用Jupyter笔记本,通过ssh-l8000:localhost:8888登录 但是:我无法关闭ssh连接。键入退出不会关闭它(只是让我等待),如果我通过ctrl-c强制退出,浏览器中的笔记本将失去与远程计算机的连接。 我是不是搞错了?或者我确实需要建立ssh连接,以便浏览器中的笔记本保持连接?
本文向大家介绍Powershell小技巧之开启关闭远程连接,包括了Powershell小技巧之开启关闭远程连接的使用技巧和注意事项,需要的朋友参考一下 如果你要通过Powershell远程访问电脑。这时你必须在对方电脑(你想要访问的电脑),用管理员权限执行下面代码: 一旦你这样执行了代码,你只要拥有目标电脑的本地管理员权限就能从其它窗体访问这台电脑了。当两台电脑在同一个域内你就可以直接指定计算机名
有人能帮我解决以下异常吗, 我正在使用Oracle OEPE eclipse和weblogic 12c。在我开始开发移动应用程序之前,它工作得很好。 我在eclipse中安装了以下插件。1.Android工具2。JBoos混合移动工具 我的电脑1上安装了以下开源软件。节点Js 2。科尔多瓦3。Ripple仿真器