darkdragn / party

A quick *.party downloader
84 stars 12 forks source link

SSL Error on Coomer #35

Open meinsundso opened 4 months ago

meinsundso commented 4 months ago

Hey, thank you for creating this nice tool. But I can't use it because of an SSL error. The site coomer.su works well in Safari and Chrome. I can view the posts and download images and videos manually, even it's a bit slow. I'm using MacOS 13.4.1 and python 3.12.2.

Can you please help?

% party coomer onlyfans jennys_passion Downloading from user: jennys_passion 0%| | 0/874 [00:00<?, ?it/s] Traceback (most recent call last):

File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1147, in create_connection transport, protocol = await self._create_connection_transport( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1180, in _create_connection_transport await waiter

File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/sslproto.py", line 578, in _on_handshake_complete raise handshake_exc

File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/sslproto.py", line 560, in _do_handshake self._sslobj.do_handshake()

File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/ssl.py", line 917, in do_handshake self._sslobj.do_handshake()

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "/Library/Frameworks/Python.framework/Versions/3.12/bin/party", line 8, in sys.exit(APP()) ^^^^^

File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/party/cli.py", line 293, in coomer pull_user(**ctx.params)

File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/party/cli.py", line 211, in pull_user output = asyncio.run( ^^^^^^^^^^^^

File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 194, in run return runner.run(main) ^^^^^^^^^^^^^^^^

File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 685, in run_until_complete return future.result() ^^^^^^^^^^^^^^^

File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/party/cli.py", line 269, in download_async temp = await asyncio.gather(*downloads) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/party/cli.py", line 252, in download status = await file.download( ^^^^^^^^^^^^^^^^^^^^

File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/party/posts.py", line 140, in download async with session.head(url, allow_redirects=True) as head:

File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/aiohttp/client.py", line 1194, in aenter self._resp = await self._coro ^^^^^^^^^^^^^^^^

File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/aiohttp/client.py", line 578, in _request conn = await self._connector.connect( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/aiohttp/connector.py", line 544, in connect proto = await self._create_connection(req, traces, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/aiohttp/connector.py", line 911, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/aiohttp/connector.py", line 1235, in _create_direct_connection raise last_exc

File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/aiohttp/connector.py", line 1204, in _create_direct_connection transp, proto = await self._wrap_create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/aiohttp/connector.py", line 994, in _wrap_create_connection raise ClientConnectorCertificateError(req.connection_key, exc) from exc

aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host coomer.su:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)')]

darkdragn commented 4 months ago

So, this could have happened because requests on your system has an old bundle, or it simply didn't pull the bundle on windows.

As a temporary measure, you can run:

export REQUESTS_CA_BUNDLE=""
export CURL_CA_BUNDLE=""

Then try running the party commands. Those environment variables will turn off ssl verification, and should make it work for you. I could add null ssl verification as a convience switch for windows, if you'd like.