Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a search command. It is not as user friendly as the yt-dlp search (e.g. #70 (comment)) but has nearly the same functionality.
The search can be done in two ways:
download
orarchive
The search command is designed to show only the specific information you want. This is done with the
-o
/--output
flag.You can specify keywords in a specific pattern and they will get replaced in the output text. The required pattern for this begins with
{{
, then the keyword, and closes with}}
(e.g.{{episode.title}}
). For example, if you want to get the title of an episode, you can useTitle {{episode.title}}
and{{episode.title}}
will be replaced with the episode title.See the following list/code snippet for all keywords and their meaning:
crunchy-cli/crunchy-cli-core/src/search/command.rs
Lines 44 to 74 in d2a8339
Other flags
Besides output formatting there are also other flags to filter the output even more.
--audio
- audio languages to include (can be specified multiple times)--search-top-results-limit
- limit of search results to parse--search-series-limit
- limit of series to search--search-movie-listing-limit
- limit of movies to search--search-episode-limit
- limit of episodes to search--search-music-limit
- limit of music to searchExamples
Get the stream url of the first Darling in the FranXX episode in English
$ crunchy search --audio en-US -o "{{stream.dash_url}}" https://www.crunchyroll.com/series/GY8VEQ95Y/darling-in-the-franxx[E1]
Get the English subtitles of the first Darling in the FranXX episode in English
$ crunchy search --audio en-US -o "{{subtitle.url}}" https://www.crunchyroll.com/series/GY8VEQ95Y/darling-in-the-franxx[E1]
Print all episodes of Darling in the FranXX with their season number, episode number, title and language in English and German