尝试使用python Skype
连接到Skpy API
。
尝试了以下解决方案:
def connect_skype(user, pwd, token):
s = Skype(connect=False)
s.conn.setTokenFile(token)
try:
s.conn.readToken()
except SkypeAuthException:
s.conn.setUserPwd(user, pwd)
s.conn.getSkypeToken()
s.conn.writeToken()
finally:
sk = Skype(user, pwd, tokenFile=token)
return sk
这是错误:
resp = self.send(prep, **send_kwargs)
File "C:\Programs\Python37\lib\site-packages\requests-2.21.0-py3.7.egg\requests\sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "C:\Programs\Python37\lib\site-packages\requests-2.21.0-py3.7.egg\requests\adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='login.skype.com', port=443): Max retries exceeded with url: /login/oauth/microsoft?client_id=578134&redirect_uri=https%3A%2F%2Fweb.skype.com (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000253EF690F60>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))
如何解决“最大重试次数”问题?