Last active
November 9, 2019 20:41
-
-
Save phelipetls/8e5ad890df096019682af44b257c41c0 to your computer and use it in GitHub Desktop.
Download arbitrary chapter of Demon Slayer manga. Just use with ./download_kimetsu 89 to download chapter 89. It will then download all pages into a folder called 089 etc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
n=1 | |
curl "https://ww1.demonslayermanga.com/chapter/demon-slayer-kimetsu-no-yaiba-chapter-$1/" | | |
sed -n '/<img class/p' | | |
sed -nr 's/.*src="(.*)".*/\1/p' | | |
tr -d '\015' | # some carriage return got in the way, gotta delete them | |
while read url; | |
do curl "$url" --create-dirs --output "$(printf %03d $1)/$(printf %02d $n).png"; | |
((++n)); | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment