audiobook-dl icon indicating copy to clipboard operation
audiobook-dl copied to clipboard

Support French Nextory

Open Speedmod88 opened this issue 1 year ago • 14 comments

Installation method: pip install "git+https://github.com/jo1gi/audiobook-dl.git"

Version: Python 3.10.12 audiobook-dl 0.7.1

Describe the bug

first time using your audiobook-dl and seem it doesnt want to login to my nextory account

here the DEBUG traceback

DEBUG audiobook-dl 0.7.1
DEBUG python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
 INFO Finding compatible source
 INFO Authenticating with nextory
DEBUG Logging in
DEBUG device_id='ad1b13b4-4b8f-31ac-ae9d-1778230b73b6'
Traceback (most recent call last):
  File "/home/drftpd/venv/bin/audiobook-dl", line 8, in <module>
    sys.exit(main())
  File "/home/drftpd/venv/lib/python3.10/site-packages/audiobookdl/__main__.py", line 31, in main
    process_url(url, options, config)
  File "/home/drftpd/venv/lib/python3.10/site-packages/audiobookdl/__main__.py", line 51, in process_url
    authenticate(url, source, options, config)
  File "/home/drftpd/venv/lib/python3.10/site-packages/audiobookdl/__main__.py", line 134, in authenticate
    login(url, source, options, config)
  File "/home/drftpd/venv/lib/python3.10/site-packages/audiobookdl/__main__.py", line 115, in login
    source.login(url, **login_data)
  File "/home/drftpd/venv/lib/python3.10/site-packages/audiobookdl/sources/source/__init__.py", line 86, in login
    self._login(url, **kwargs)
  File "/home/drftpd/venv/lib/python3.10/site-packages/audiobookdl/sources/nextory.py", line 62, in _login
    login_token = session_response["login_token"]
KeyError: 'login_token'

is me who did something wrong?

Command output

audiobook-dl -d --username [email protected] --password password --combine --output-format mp3 --output /Audiobooks/{author}/{series}/{title}/ https://nextory.com/fr/catalog/books/1579353

Thanks for your Help

Speedmod88 avatar Dec 03 '23 21:12 Speedmod88

No, you didn't do anything wrong. Nextory had just made an update that made audiobook-dl not work. Should be fixed not in f8d6a756c7a4626bf3ab87927a3e19cace31c82e. Hope it works.

jo1gi avatar Dec 10 '23 12:12 jo1gi

Hi, not sure how I need to do to update it in pip venv

I did

python3 -m venv venv
source venv/bin/activate
pip install "git+https://github.com/jo1gi/audiobook-dl.git"
Collecting git+https://github.com/jo1gi/audiobook-dl.git
  Cloning https://github.com/jo1gi/audiobook-dl.git to /tmp/pip-req-build-bn8fp1                                                                                                                                                             x2
  Running command git clone --filter=blob:none --quiet https://github.com/jo1gi/                                                                                                                                                             audiobook-dl.git /tmp/pip-req-build-bn8fp1x2
  Resolved https://github.com/jo1gi/audiobook-dl.git to commit f8d6a756c7a4626bf                                                                                                                                                             3ab87927a3e19cace31c82e
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: m3u8 in ./venv/lib/python3.10/site-packages (from                                                                                                                                                              audiobook-dl==0.7.1) (3.6.0)
Requirement already satisfied: appdirs in ./venv/lib/python3.10/site-packages (f                                                                                                                                                             rom audiobook-dl==0.7.1) (1.4.4)
Requirement already satisfied: mutagen in ./venv/lib/python3.10/site-packages (f                                                                                                                                                             rom audiobook-dl==0.7.1) (1.47.0)
Requirement already satisfied: rich in ./venv/lib/python3.10/site-packages (from                                                                                                                                                              audiobook-dl==0.7.1) (13.7.0)
Requirement already satisfied: lxml in ./venv/lib/python3.10/site-packages (from                                                                                                                                                              audiobook-dl==0.7.1) (4.9.3)
Requirement already satisfied: requests in ./venv/lib/python3.10/site-packages (                                                                                                                                                             from audiobook-dl==0.7.1) (2.31.0)
Requirement already satisfied: cssselect in ./venv/lib/python3.10/site-packages                                                                                                                                                              (from audiobook-dl==0.7.1) (1.2.0)
Requirement already satisfied: attrs in ./venv/lib/python3.10/site-packages (fro                                                                                                                                                             m audiobook-dl==0.7.1) (23.1.0)
Requirement already satisfied: tomli in ./venv/lib/python3.10/site-packages (fro                                                                                                                                                             m audiobook-dl==0.7.1) (2.0.1)
Requirement already satisfied: pillow in ./venv/lib/python3.10/site-packages (fr                                                                                                                                                             om audiobook-dl==0.7.1) (10.1.0)
Requirement already satisfied: pycryptodome in ./venv/lib/python3.10/site-packag                                                                                                                                                             es (from audiobook-dl==0.7.1) (3.19.0)
Requirement already satisfied: importlib-resources in ./venv/lib/python3.10/site                                                                                                                                                             -packages (from audiobook-dl==0.7.1) (6.1.1)
Requirement already satisfied: iso8601 in ./venv/lib/python3.10/site-packages (f                                                                                                                                                             rom m3u8->audiobook-dl==0.7.1) (2.1.0)
Requirement already satisfied: idna<4,>=2.5 in ./venv/lib/python3.10/site-packag                                                                                                                                                             es (from requests->audiobook-dl==0.7.1) (3.6)
Requirement already satisfied: certifi>=2017.4.17 in ./venv/lib/python3.10/site-                                                                                                                                                             packages (from requests->audiobook-dl==0.7.1) (2023.11.17)
Requirement already satisfied: charset-normalizer<4,>=2 in ./venv/lib/python3.10                                                                                                                                                             /site-packages (from requests->audiobook-dl==0.7.1) (3.3.2)
Requirement already satisfied: urllib3<3,>=1.21.1 in ./venv/lib/python3.10/site-                                                                                                                                                             packages (from requests->audiobook-dl==0.7.1) (2.1.0)
Requirement already satisfied: markdown-it-py>=2.2.0 in ./venv/lib/python3.10/si                                                                                                                                                             te-packages (from rich->audiobook-dl==0.7.1) (3.0.0)
Requirement already satisfied: pygments<3.0.0,>=2.13.0 in ./venv/lib/python3.10/                                                                                                                                                             site-packages (from rich->audiobook-dl==0.7.1) (2.17.2)
Requirement already satisfied: mdurl~=0.1 in ./venv/lib/python3.10/site-packages                                                                                                                                                              (from markdown-it-py>=2.2.0->rich->audiobook-dl==0.7.1) (0.1.2)

and I still have the same issue.... still not working :(

Speedmod88 avatar Dec 10 '23 15:12 Speedmod88

Can you send the command ouput with --debug?

jo1gi avatar Dec 10 '23 20:12 jo1gi

DEBUG audiobook-dl 0.7.1
DEBUG python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
 INFO Finding compatible source
 INFO Authenticating with nextory
DEBUG Logging in
DEBUG device_id='ad1b13b4-4b8f-31ac-ae9d-1778230b73b6'
Traceback (most recent call last):
  File "/home/drftpd/venv/bin/audiobook-dl", line 8, in <module>
    sys.exit(main())
  File "/home/drftpd/venv/lib/python3.10/site-packages/audiobookdl/__main__.py", line 31, in main
    process_url(url, options, config)
  File "/home/drftpd/venv/lib/python3.10/site-packages/audiobookdl/__main__.py", line 51, in process_url
    authenticate(url, source, options, config)
  File "/home/drftpd/venv/lib/python3.10/site-packages/audiobookdl/__main__.py", line 134, in authenticate
    login(url, source, options, config)
  File "/home/drftpd/venv/lib/python3.10/site-packages/audiobookdl/__main__.py", line 115, in login
    source.login(url, **login_data)
  File "/home/drftpd/venv/lib/python3.10/site-packages/audiobookdl/sources/source/__init__.py", line 86, in login
    self._login(url, **kwargs)
  File "/home/drftpd/venv/lib/python3.10/site-packages/audiobookdl/sources/nextory.py", line 62, in _login
    login_token = session_response["login_token"]
KeyError: 'login_token'

Speedmod88 avatar Dec 10 '23 23:12 Speedmod88

It looks like audiobook-dlhasn't been updated properly. Maybe try pip install --upgrade "git+https://github.com/jo1gi/audiobook-dl.git"?

jo1gi avatar Dec 11 '23 00:12 jo1gi

not sure why but pip install --upgrade "git+https://github.com/jo1gi/audiobook-dl.git" didnt worked

so I reinstalled the whole thing with pip uninstall and than pip install

now I got this error :

DEBUG audiobook-dl 0.7.1
DEBUG python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
 INFO Finding compatible source
 INFO Authenticating with nextory
DEBUG Logging in
DEBUG device_id='ad1b13b4-4b8f-31ac-ae9d-1778230b73b6'
DEBUG session_response={'error': {'code': 3009, 'key': 'UserNotFound', 'description': "Account doesn't exists with input identifier", 'message': 'The password entered is incorrect. Try again.'}}
Traceback (most recent call last):
  File "/home/drftpd/venv/bin/audiobook-dl", line 8, in <module>
    sys.exit(main())
  File "/home/drftpd/venv/lib/python3.10/site-packages/audiobookdl/__main__.py", line 31, in main
    process_url(url, options, config)
  File "/home/drftpd/venv/lib/python3.10/site-packages/audiobookdl/__main__.py", line 51, in process_url
    authenticate(url, source, options, config)
  File "/home/drftpd/venv/lib/python3.10/site-packages/audiobookdl/__main__.py", line 134, in authenticate
    login(url, source, options, config)
  File "/home/drftpd/venv/lib/python3.10/site-packages/audiobookdl/__main__.py", line 115, in login
    source.login(url, **login_data)
  File "/home/drftpd/venv/lib/python3.10/site-packages/audiobookdl/sources/source/__init__.py", line 86, in login
    self._login(url, **kwargs)
  File "/home/drftpd/venv/lib/python3.10/site-packages/audiobookdl/sources/nextory.py", line 63, in _login
    login_token = session_response["login_token"]
KeyError: 'login_token'

that's weird because my password are correct....

I can login in the website with the same username and password I pasted there --username --password

Speedmod88 avatar Dec 11 '23 08:12 Speedmod88

I'm not sure whats wrong. Would you be willing to lend me your account for testing?

jo1gi avatar Dec 11 '23 14:12 jo1gi

sure, how I can transmit you the account info?

Speedmod88 avatar Dec 11 '23 17:12 Speedmod88

Send it to [email protected]?

jo1gi avatar Dec 11 '23 17:12 jo1gi

ok sent

Speedmod88 avatar Dec 11 '23 17:12 Speedmod88

I have figured out why it didn't work. French Nextory functions as a separate platform, with different login and api endpoints.

jo1gi avatar Dec 13 '23 12:12 jo1gi

ah that's why... :( do you think you can add it?

Speedmod88 avatar Dec 14 '23 07:12 Speedmod88

Potentially, but it will take some time.

jo1gi avatar Dec 15 '23 01:12 jo1gi

I am ready to wait, thanks a lot :)

Speedmod88 avatar Dec 16 '23 14:12 Speedmod88