Describe the bug
When using the epub command to download content from JNC Nina, an unrecoverable error occurs.
Expected behavior
The specified parts should be downloaded
To Reproducejncep epub --email REDACTED --password REDACTED --byvolume SERIES-LINK (using the Nina branch)
Debug trace
Relevant extract:
| Traceback (most recent call last):
| File "C:\Python312\Lib\site-packages\jncep\core.py", line 632, in fetch_content_and_images_for_part
| content = await session.api.fetch_content(part_id, "data.xhtml")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Python312\Lib\site-packages\jncep\jnclabs.py", line 62, in wrapper
| response = await f(*args, **kwargs)
| ^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Python312\Lib\site-packages\jncep\jnclabs.py", line 176, in fetch_content
| r = await self._call_labs_api_authenticated("GET", path)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Python312\Lib\site-packages\jncep\jnclabs.py", line 216, in _call_labs_api_authenticated
| r = await self._call_authenticated(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Python312\Lib\site-packages\jncep\jnclabs.py", line 251, in _call_authenticated
| r.raise_for_status()
| File "C:\Python312\Lib\site-packages\asks\response_objects.py", line 47, in raise_for_status
| raise BadStatus(
| asks.errors.BadStatus: 404 Client Error: Not Found for url: https://api.jnc-nina.eu/embed/REDACTED-SLUG-ID/data.xhtml
Environment (please complete the following information):
OS: Windows 11
Python version: 3.12.0
JNCEP version: v46 (nina branch)
Proposed fix
This bug is most likely caused by a recent API change for Nina (not sure about the "main" JNC API), adding a /v2 to certain API calls, at the very list the one used in the debug trace above.
Adding /v2 to the path variable of the fetch_content() method of the JNCLabsAPI class fixes the issue.
Describe the bug When using the epub command to download content from JNC Nina, an unrecoverable error occurs.
Expected behavior The specified parts should be downloaded
To Reproduce
jncep epub --email REDACTED --password REDACTED --byvolume SERIES-LINK
(using the Nina branch)Debug trace Relevant extract:
Environment (please complete the following information):
Proposed fix This bug is most likely caused by a recent API change for Nina (not sure about the "main" JNC API), adding a /v2 to certain API calls, at the very list the one used in the debug trace above.
Adding /v2 to the path variable of the fetch_content() method of the JNCLabsAPI class fixes the issue.