Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Add flags anime-url and episode-count to grab #280

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LQR471814
Copy link

@LQR471814 LQR471814 commented Jul 18, 2023

This PR adds the following flags to the grab command.

-u, --anime-url TEXT      Use the URL for a specific anime, overrides query.
-e, --episode-list        Only return a list of episode numbers for the given anime.

They were added to help external programs reduce overhead in using animdl's features. Particularly in these two use cases.

  1. Not needing to search twice, one can simply pipe in the url returned by animdl search -j ....
  2. Being able to know the available episodes of a given anime without running a full grab.
$ animdl grab --episode-list "allanime:bocchi the rock"

Welcome, lqr471814.
   It is 09:09 AM on a beautiful Tuesday!
The content is outputted to stdout while these messages are outputted to stderr.
Waiting for you to select a 'search result'.
{"episodes": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]}
$ animdl grab --anime-url https://allanime.to/anime/5FYQwxEPq4YdppRKK "bocchi the rock"

Hey, lqr471814.
   It is 09:12 AM on a beautiful Tuesday!
The content is outputted to stdout while these messages are outputted to stderr.
{"episode": 1, "streams": [...]}
{"episode": 2, "streams": [...]}
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant