Giter VIP home page Giter VIP logo

Comments (15)

jo1gi avatar jo1gi commented on July 20, 2024 1

audiobook-dl uses an old version of the api which is a bit buggy. I'm working on updating it.

from audiobook-dl.

jo1gi avatar jo1gi commented on July 20, 2024

You should be able to download the books with bb22867. Add the books to Saved for Later/Want to Read. Concatenation does not working.

from audiobook-dl.

Nurffe avatar Nurffe commented on July 20, 2024

You should be able to download the books with bb22867. Add the books to Saved for Later/Want to Read. Concatenation does not working.

Tried to verify but seems like no luck. Am I doing something wrong trying this out?

user@DESKTOP- :~/audiobook-dl$ git checkout bb22867
Note: switching to 'bb22867'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at bb22867 Implement new Nextory api
user@DESKTOP- :~/audiobook-dl$ python3 -m venv venv
user@DESKTOP- :~/audiobook-dl$ source venv/bin/activate
(venv) user@DESKTOP- :~/audiobook-dl$ pip install "git+https://github.com/jo1gi/audiobook-dl.git@nextory-update"
Collecting git+https://github.com/jo1gi/audiobook-dl.git@nextory-update
  Cloning https://github.com/jo1gi/audiobook-dl.git (to revision nextory-update) to /tmp/pip-req-build-7tdftrru
  Running command git clone --filter=blob:none --quiet https://github.com/jo1gi/audiobook-dl.git /tmp/pip-req-build-7tdftrru
  Running command git checkout -b nextory-update --track origin/nextory-update
  Switched to a new branch 'nextory-update'
  Branch 'nextory-update' set up to track remote branch 'nextory-update' from 'origin'.
  Resolved https://github.com/jo1gi/audiobook-dl.git to commit bb2286761a62bfd6fbd0c3c4e18a2d2959ab87f9
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting attrs
  Using cached attrs-23.1.0-py3-none-any.whl (61 kB)
Collecting mutagen
  Using cached mutagen-1.46.0-py3-none-any.whl (193 kB)
Collecting pycryptodome
  Using cached pycryptodome-3.18.0-cp35-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB)
Collecting cssselect
  Using cached cssselect-1.2.0-py2.py3-none-any.whl (18 kB)
Collecting m3u8
  Using cached m3u8-3.5.0-py3-none-any.whl (24 kB)
Collecting pillow
  Using cached Pillow-10.0.0-cp310-cp310-manylinux_2_28_x86_64.whl (3.4 MB)
Collecting requests
  Using cached requests-2.31.0-py3-none-any.whl (62 kB)
Collecting importlib-resources
  Using cached importlib_resources-6.0.0-py3-none-any.whl (31 kB)
Collecting lxml
  Using cached lxml-4.9.3-cp310-cp310-manylinux_2_28_x86_64.whl (7.9 MB)
Collecting rich
  Using cached rich-13.5.2-py3-none-any.whl (239 kB)
Collecting iso8601
  Using cached iso8601-2.0.0-py3-none-any.whl (7.5 kB)
Collecting urllib3<3,>=1.21.1
  Using cached urllib3-2.0.4-py3-none-any.whl (123 kB)
Collecting charset-normalizer<4,>=2
  Using cached charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (201 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2023.7.22-py3-none-any.whl (158 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting pygments<3.0.0,>=2.13.0
  Using cached Pygments-2.15.1-py3-none-any.whl (1.1 MB)
Collecting markdown-it-py>=2.2.0
  Using cached markdown_it_py-3.0.0-py3-none-any.whl (87 kB)
Collecting mdurl~=0.1
  Using cached mdurl-0.1.2-py3-none-any.whl (10.0 kB)
Building wheels for collected packages: audiobook-dl
  Building wheel for audiobook-dl (pyproject.toml) ... done
  Created wheel for audiobook-dl: filename=audiobook_dl-0.6.1-py3-none-any.whl size=61505 sha256=446ffa7ee119ce5465c42bbaf6a3f693ec3fdc2d57021dbfaaaaa689ad5c1a6c
  Stored in directory: /tmp/pip-ephem-wheel-cache-krgzgytg/wheels/1f/81/d7/12f22426f70f21c13db1cd824f45723a5c328c71d22d165be9
Successfully built audiobook-dl
Installing collected packages: urllib3, pygments, pycryptodome, pillow, mutagen, mdurl, lxml, iso8601, importlib-resources, idna, cssselect, charset-normalizer, certifi, attrs, requests, markdown-it-py, m3u8, rich, audiobook-dl
Successfully installed attrs-23.1.0 audiobook-dl-0.6.1 certifi-2023.7.22 charset-normalizer-3.2.0 cssselect-1.2.0 idna-3.4 importlib-resources-6.0.0 iso8601-2.0.0 lxml-4.9.3 m3u8-3.5.0 markdown-it-py-3.0.0 mdurl-0.1.2 mutagen-1.46.0 pillow-10.0.0 pycryptodome-3.18.0 pygments-2.15.1 requests-2.31.0 rich-13.5.2 urllib3-2.0.4
(venv) user@DESKTOP- :~/audiobook-dl$ pip install appdirs
Collecting appdirs
  Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Installing collected packages: appdirs
Successfully installed appdirs-1.4.4
(venv) user@DESKTOP- :~/audiobook-dl$ pip install tomli
Collecting tomli
  Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Installing collected packages: tomli
Successfully installed tomli-2.0.1

(venv) user@DESKTOP- :~/audiobook-dl$ audiobook-dl -d --username user --password password https://nextory.com/fi/book/boo-ok-99999
DEBUG audiobook-dl 0.6.1
DEBUG python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]
Finding compatible source
Authenticating with nextory
DEBUG Logging in
DEBUG device_id='xx'
DEBUG profile_token='xx'
DEBUG Downloading result of https://nextory.com/fi/book/boo-ok-99999
Traceback (most recent call last):
  File "/home/user/audiobook-dl/venv/lib/python3.10/site-packages/audiobookdl/__main__.py", line 32, in main
    process_url(url, options, config)
  File "/home/user/audiobook-dl/venv/lib/python3.10/site-packages/audiobookdl/__main__.py", line 54, in process_url
    result = source.download(url)
  File "/home/user/audiobook-dl/venv/lib/python3.10/site-packages/audiobookdl/sources/nextory.py", line 93, in download
    book_info = self.find_book_info(format_id, want_to_read_list)
  File "/home/user/audiobook-dl/venv/lib/python3.10/site-packages/audiobookdl/sources/nextory.py", line 118, in find_book_info
    raise AudiobookDLException(error_description = "nextory_want_to_read")
audiobookdl.exceptions.AudiobookDLException

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/audiobook-dl/venv/bin/audiobook-dl", line 8, in <module>
    sys.exit(main())
  File "/home/user/audiobook-dl/venv/lib/python3.10/site-packages/audiobookdl/__main__.py", line 34, in main
    e.print()
  File "/home/user/audiobook-dl/venv/lib/python3.10/site-packages/audiobookdl/exceptions.py", line 12, in print
    print_error_file(self.error_description, **self.data)
  File "/home/user/audiobook-dl/venv/lib/python3.10/site-packages/audiobookdl/logging.py", line 37, in print_error_file
    msg = read_asset_file(f"assets/errors/{name}.txt").format(**kwargs)
  File "/home/user/audiobook-dl/venv/lib/python3.10/site-packages/audiobookdl/utils/__init__.py", line 32, in read_asset_file
    return importlib.resources.files("audiobookdl") \
  File "/usr/lib/python3.10/pathlib.py", line 1134, in read_text
    with self.open(mode='r', encoding=encoding, errors=errors) as f:
  File "/usr/lib/python3.10/pathlib.py", line 1119, in open
    return self._accessor.open(self, mode, buffering, encoding, errors,
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/audiobook-dl/venv/lib/python3.10/site-packages/audiobookdl/assets/errors/unknown.txt'

from audiobook-dl.

jo1gi avatar jo1gi commented on July 20, 2024

Did you add the book to your want to read list? That's the only thing you could have done wrong. I will see if I can fix it.

from audiobook-dl.

Nurffe avatar Nurffe commented on July 20, 2024

I've added the book using the heart icon in application which states "save for later". In mobile application it shows the book under my library and in "saved for later" items. Other categories in app under "my library" are Downloaded and read books. So I believe this "saved for later" is the "want to read list" you are referring to, and yes the book is there

from audiobook-dl.

jo1gi avatar jo1gi commented on July 20, 2024

Yes, Save for later is the want to read list.

from audiobook-dl.

jo1gi avatar jo1gi commented on July 20, 2024

Think I got it working. Try 3a8c236.

from audiobook-dl.

Nurffe avatar Nurffe commented on July 20, 2024

Think I got it working. Try 3a8c236.

Yes, able to download now \o/
However it looks like the output is .aac files in 5 sec long parts. Resulting in thousands of aac audiofiles

For example

Bookname - part0.aac
Bookname - part1.aac
Bookname - part2.aac
Bookname - part3.aac
......
Bookname - part3750.aac
Bookname - part3751.aac
Bookname - part3752.aac

Is this intended behavior? Or should we get single file out?

from audiobook-dl.

jo1gi avatar jo1gi commented on July 20, 2024

That's the intended behavior. I'm working on something to combine the files, but it isn't working correctly. You can run the command with --combine and --output-format mp3 to create a single file, but it will take a lot longer.

from audiobook-dl.

Nurffe avatar Nurffe commented on July 20, 2024

That's the intended behavior. I'm working on something to combine the files, but it isn't working correctly. You can run the command with --combine and --output-format mp3 to create a single file, but it will take a lot longer.

Heh, tried with --combine and --output-format mp4. Looks like ffmpeg does not like thousands of files as input? :D

Traceback (most recent call last):
  File "/home/user/audiobook-dl/venv/bin/audiobook-dl", line 8, in <module>
    sys.exit(main())
  File "/home/user/audiobook-dl/venv/lib/python3.10/site-packages/audiobookdl/__main__.py", line 32, in main
    process_url(url, options, config)
  File "/home/user/audiobook-dl/venv/lib/python3.10/site-packages/audiobookdl/__main__.py", line 58, in process_url
    process_audiobook(result, options)
  File "/home/user/audiobook-dl/venv/lib/python3.10/site-packages/audiobookdl/__main__.py", line 163, in process_audiobook
    download(audiobook, options)
  File "/home/user/audiobook-dl/venv/lib/python3.10/site-packages/audiobookdl/output/download.py", line 37, in download
    download_audiobook(audiobook, output_dir, options)
  File "/home/user/audiobook-dl/venv/lib/python3.10/site-packages/audiobookdl/output/download.py", line 57, in download_audiobook
    output.combine_audiofiles(filepaths, output_dir, output_path)
  File "/home/user/audiobook-dl/venv/lib/python3.10/site-packages/audiobookdl/output/output.py", line 26, in combine_audiofiles
    subprocess.run(
  File "/usr/lib/python3.10/subprocess.py", line 503, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 7] Argument list too long: 'ffmpeg'

from audiobook-dl.

jo1gi avatar jo1gi commented on July 20, 2024

You are right. Made a temporary fix: 347174a.

from audiobook-dl.

Nurffe avatar Nurffe commented on July 20, 2024

You are right. Made a temporary fix: 347174a.

Looks like with this we are getting single .mp4 file out but it's only the first 5 seconds. So joining files failed

from audiobook-dl.

jo1gi avatar jo1gi commented on July 20, 2024

Try mp3 instead. Then it will also reencode the data.

from audiobook-dl.

Nurffe avatar Nurffe commented on July 20, 2024

Try mp3 instead. Then it will also reencode the data.

Alright, mp3 works

--combine --output-format mp3 gives single .mp3 which looks like complete file. Chapters are 404 but I don't think nextory has those anyways supported in the application

btw you might want to add appdirs and tomli in dependencies. Think those were missing when initiating venv, installing and trying to run for first time

Thanks for your efforts 👍

from audiobook-dl.

jo1gi avatar jo1gi commented on July 20, 2024

You're welcome.

Some books have chapters, but most are missing them.

from audiobook-dl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.