Skip to content

Commit

Permalink
Fix grep wrong slug when anime name contains the inputted one
Browse files Browse the repository at this point in the history
Fix #61
  • Loading branch information
KevCui committed Apr 24, 2022
1 parent a6678ac commit 2808a48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions animepahe-dl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ get() {
download_anime_list() {
get "$_ANIME_URL" \
| grep "/anime/" \
| sed -E 's/.*anime\//[/;s/" title="/] /;s/\">.*//' \
| sed -E 's/.*anime\//[/;s/" title="/] /;s/\">.*/ /' \
> "$_ANIME_LIST_FILE"
}

Expand All @@ -132,7 +132,7 @@ search_anime_by_name() {
if [[ "$n" -eq "0" ]]; then
echo ""
else
"$_JQ" -r '.data[] | "[\(.session)] \(.title)"' <<< "$d" \
"$_JQ" -r '.data[] | "[\(.session)] \(.title) "' <<< "$d" \
| tee -a "$_ANIME_LIST_FILE" \
| remove_slug
fi
Expand Down

0 comments on commit 2808a48

Please sign in to comment.