I wrote a different script that is more specific to this site. You can find it here:
https://files.luo.ma/automators-talk/5900/digitalhistory.sh
You can run it either like this:
digitalhistory.sh 'http://www.digitalhistory.uh.edu/disp_textbook.cfm?smtID=3&psid=4082' \
'http://www.digitalhistory.uh.edu/disp_textbook.cfm?smtID=3&psid=4085' \
'http://www.digitalhistory.uh.edu/disp_textbook.cfm?smtID=3&psid=4084' \
'http://www.digitalhistory.uh.edu/disp_textbook.cfm?smtID=3&psid=4086' \
'http://www.digitalhistory.uh.edu/disp_textbook.cfm?smtID=3&psid=4087' \
'http://www.digitalhistory.uh.edu/disp_textbook.cfm?smtID=3&psid=4063'
to save the files by the URLs…
Or like this
digitalhistory.sh 3970 4064 3948 3962
to save by the ID number.