Skip to content

Instantly share code, notes, and snippets.

@Dih5
Created December 8, 2017 14:08
Show Gist options
  • Save Dih5/5ec20f8883b6c4a99ed65dc753e9659b to your computer and use it in GitHub Desktop.
Save Dih5/5ec20f8883b6c4a99ed65dc753e9659b to your computer and use it in GitHub Desktop.
Download a book from National Diet Library
#!/bin/bash
for i in {1..174} # Change number of pages.
do
# Change URL to that of the book.
wget "http://dl.ndl.go.jp/view/jpegOutput?itemId=info%3Andljp%2Fpid%2F971654&contentNo=$i&outputScale=1" -O $i.jpeg
# They kindly ask for waiting 30s between requests. Don't be an ass and do so.
sleep 30
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment