vincentscode / podimo-dl

🎧 Download audiobooks and podcasts from podimo.com
9 stars 1 forks source link

Error #2

Open Diemertje opened 1 year ago

Diemertje commented 1 year ago

After running the script there was an error:

"raise ClientResponseError( aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://graphql.pdm-gateway.com/graphql')"

I think the link might be broken?

kenoben commented 1 year ago

Same thing here.

vincentscode commented 1 year ago

It seems like their internal API has been changed. All mutations and queries will have to be updated. Unfortunately I do not have time to update those right now, but one should be able to extract them from the podimo website relatively easily.

leonvsc commented 1 year ago

Hi @vincentscode,

I have looked into this but I didn't get it working yet. The URL from the API seems like to be: https://open.podimo.com/graphql.

If I change the URL to this I get logged in (as far as I know) and I can fill in a search query into the program. But then I get stuck, I tried to change the query but I didn't get it working yet. Can you help me to get into the right direction with a example for searching podcasts? This is the first time that I am touching GraphQL.

vincentscode commented 1 year ago

Hi @leonvsc, I have updated the client with the new query & endpoint definitions and a generator script if they are updated again. Unfortunately I do not have access to a Podimo account for testing, but feel free to test with the latest version.

leonvsc commented 1 year ago

Hi @leonvsc, I have updated the client with the new query & endpoint definitions and a generator script if they are updated again. Unfortunately I do not have access to a Podimo account for testing, but feel free to test with the latest version.

Hi!

I did a little bit of testing, on line 27 in podimo-dl.py client needs to be client1 I guess? After that change I get the following error:

Traceback (most recent call last):
  File "/home/User/code/podimo-dl/podimo-dl.py", line 141, in <module>
    main()
  File "/home/User/code/podimo-dl/podimo-dl.py", line 102, in main
    podimo.login(email, password, is_creator)
  File "/home/User/code/podimo-dl/podimo-dl.py", line 27, in login
    result = self.client1.execute(queryTokenWithCredentials, variable_values={
  File "/home/User/.local/lib/python3.10/site-packages/gql/client.py", line 388, in execute
    data = loop.run_until_complete(
  File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/home/User/.local/lib/python3.10/site-packages/gql/client.py", line 285, in execute_async
    return await session.execute(
  File "/home/User/.local/lib/python3.10/site-packages/gql/client.py", line 1231, in execute
    raise TransportQueryError(
gql.transport.exceptions.TransportQueryError: {'message': 'Variable "$scope" of required type "UserScope!" was not provided.', 'locations': [{'line': 1, 'column': 65}], 'level': 'error', 'code': 'unknown'}

Maybe you know where the error is coming from?

BiFl-88 commented 2 months ago

I got the following error while try to execute the dl. Do we have any other way to connect?

Traceback (most recent call last): File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\gql\transport\aiohttp.py", line 331, in execute result = await resp.json(content_type=None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiohttp\client_reqrep.py", line 1216, in json return loads(stripped.decode(encoding)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\json__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\gql\transport\aiohttp.py", line 319, in raise_response_error resp.raise_for_status() File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiohttp\client_reqrep.py", line 1093, in raise_for_status raise ClientResponseError( aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url='https://studio.podimo.com/graphql'

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

Traceback (most recent call last): File "C:\Users\User\Desktop\User\Python\podimo-dl.py", line 141, in main() File "C:\Users\User\Desktop\User\Python\podimo-dl.py", line 102, in main podimo.login(email, password, is_creator) File "C:\Users\User\Desktop\User\Python\podimo-dl.py", line 27, in login result = self.client1.execute(queryTokenWithCredentials, variable_values={ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\gql\client.py", line 469, in execute data = loop.run_until_complete( ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 687, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\gql\client.py", line 367, in execute_async return await session.execute( ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\gql\client.py", line 1628, in execute result = await self._execute( ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\gql\client.py", line 1537, in _execute result = await self.transport.execute( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\gql\transport\aiohttp.py", line 338, in execute await raise_response_error(resp, "Not a JSON answer") File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\gql\transport\aiohttp.py", line 321, in raise_response_error raise TransportServerError(str(e), e.status) from e gql.transport.exceptions.TransportServerError: 403, message='Forbidden', url='https://studio.podimo.com/graphql'