in reply to Fetch html to a file

You can use HTML::SimpleLinkExtor to easily find all links in a document. But you'd better get thru all HTTPS to the toc of your book first :)