ответ
SSLError Traceback (most recent call last)
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiohttp/connector.py in _create_direct_connection(self, req)
619 server_hostname=hinfo['hostname'] if sslcontext else None,
--> 620 local_addr=self._local_addr)
621 has_cert = transp.get_extra_info('sslcontext')
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py in create_connection(self, protocol_factory, host, port, ssl, family, proto, flags, sock, local_addr, server_hostname)
801 transport, protocol = yield from self._create_connection_transport(
--> 802 sock, protocol_factory, ssl, server_hostname)
803 if self._debug:
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py in _create_connection_transport(self, sock, protocol_factory, ssl, server_hostname, server_side)
827 try:
--> 828 yield from waiter
829 except:
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/sslproto.py in data_received(self, data)
502 try:
--> 503 ssldata, appdata = self._sslpipe.feed_ssldata(data)
504 except ssl.SSLError as e:
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/sslproto.py in feed_ssldata(self, data, only_handshake)
200 # Call do_handshake() until it doesn't raise anymore.
--> 201 self._sslobj.do_handshake()
202 self._state = _WRAPPED
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py in do_handshake(self)
682 """Start the SSL/TLS handshake."""
--> 683 self._sslobj.do_handshake()
684 if self.context.check_hostname:
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)
The above exception was the direct cause of the following exception:
ClientOSError Traceback (most recent call last)
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiohttp/connector.py in connect(self, req)
307 transport, proto = \
--> 308 yield from self._create_connection(req)
309
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiohttp/connector.py in _create_connection(self, req)
596 else:
--> 597 transport, proto = yield from self._create_direct_connection(req)
598
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiohttp/connector.py in _create_direct_connection(self, req)
642 'Can not connect to %s:%s [%s]' %
--> 643 (req.host, req.port, exc.strerror)) from exc
644
ClientOSError: [Errno 1] Can not connect to mobile.bet365.com:443 [[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)]
The above exception was the direct cause of the following exception:
ClientOSError Traceback (most recent call last)
/Users/mrk/parser.py in <module>()
17
18 loop = asyncio.get_event_loop()
---> 19 loop.run_until_complete(fetch())
20 loop.close()
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py in run_until_complete(self, future)
464 raise RuntimeError('Event loop stopped before Future completed.')
465
--> 466 return future.result()
467
468 def stop(self):
/Users/mrk/parser.py in fetch()
9 query = {'pt':11,'tl': 'CONFIG_1_9;BOVInPlay_1_9;B__time', 'ci': 171}
10 async with aiohttp.ClientSession() as session:
---> 11 async with session.get(URL('https://mobile.bet365.com/#type=InPlay')) as r:
12 async with aiohttp.ClientSession(cookie_jar=jar, connector=conn) as session:
13 async with session.get(URL('https://mobile.bet365.com/mobilepreload/').with_query(query)) as r:
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiohttp/client.py in __aenter__(self)
538 @asyncio.coroutine
539 def __aenter__(self):
--> 540 self._resp = yield from self._coro
541 return self._resp
542
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiohttp/client.py in _request(self, method, url, params, data, headers, skip_auto_headers, auth, allow_redirects, max_redirects, encoding, version, compress, chunked, expect100, read_until_eof, proxy, proxy_auth, timeout)
174
175 with Timeout(timeout, loop=self._loop):
--> 176 conn = yield from self._connector.connect(req)
177 conn.writer.set_tcp_nodelay(True)
178 try:
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiohttp/connector.py in connect(self, req)
316 exc.errno,
317 'Cannot connect to host {0[0]}:{0[1]} ssl:{0[2]} [{1}]'
--> 318 .format(key, exc.strerror)) from exc
319 except:
320 self._release_waiter(key)
ClientOSError: [Errno 1] Cannot connect to host mobile.bet365.com:443 ssl:True [Can not connect to mobile.bet365.com:443 [[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)]]
[TerminalIPythonApp] Exiting application: ipython