curl http://id.loc.gov/authorities/names/nb2015017302.madsrdf.rdf -o nb2015017302.rdf
The difference here is you have to know what kind of authority you're querying. So you'll need to do names, subjects, etc. separately, whereas for the lccn query, it's straight-up lccn.
Working from a simple list:
names: for lccn in nb2015017302 n89223874; do curl http://id.loc.gov/authorities/names/$lccn.madsrdf.rdf -o $lccn.rdf; sleep 3; done
subjects: for lccn in sh2016002835 sh86003754; do curl http://id.loc.gov/authorities/subjects/$lccn.madsrdf.rdf -o $lccn.rdf; sleep 3; done
Separate lccns with a single space. BE SURE TO CHECK WHETHER YOU'RE DOING NAME, SUBJECT, ETC.
- name = /names/
- subject = /subjects/
- other things will have their own too...
If it gets longer, consider making a full bash script, as below:
#!/bin/bash
for lccn in nb2015017302 n89223874 n82203435 n2017074015
do
curl http://id.loc.gov/authorities/names/$lccn.madsrdf.rdf -o $lccn.rdf
sleep 3
done