mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-10-28 04:44:11 -07:00
update link parsing
This commit is contained in:
parent
7c85a91d65
commit
74ac27bb79
9
ani-cli
9
ani-cli
@ -83,11 +83,10 @@ get_dpage_link() {
|
|||||||
ep_no=$2
|
ep_no=$2
|
||||||
|
|
||||||
# credits to fork: https://github.com/Dink4n/ani-cli for the fix
|
# credits to fork: https://github.com/Dink4n/ani-cli for the fix
|
||||||
anime_page=$(curl -s "$BASE_URL/$anime_id-$ep_no")
|
for params in "-episode-$ep_no" "-$ep_no" "-episode-$ep_no-1" "-camrip-episode-$ep_no"; do
|
||||||
|
anime_page=$(curl -s "$BASE_URL/$anime_id$params")
|
||||||
if printf '%s' "$anime_page" | grep -q "404"; then
|
printf '%s' "$anime_page" | grep -q '404' || break
|
||||||
anime_page=$(curl -s "$BASE_URL/$anime_id-episode-$ep_no")
|
done
|
||||||
fi
|
|
||||||
|
|
||||||
printf '%s' "$anime_page" |
|
printf '%s' "$anime_page" |
|
||||||
sed -n -E 's/^[[:space:]]*<a href="#" rel="100" data-video="([^"]*)".*/\1/p' |
|
sed -n -E 's/^[[:space:]]*<a href="#" rel="100" data-video="([^"]*)".*/\1/p' |
|
||||||
|
Loading…
Reference in New Issue
Block a user