Suggest you take a look at:
http://www.httrack.com/
This will create a local copy of the file and its dependent files on your computer.
You can then use an html editor like Kompozer to remove any remaining references to the web. I have been working on some book at the center for military history us army. When I use htt track, it downloads the whole book by following links, since each chapter is an independent html file.
When it is done there is an independent copy on my computer and I only need to point to the starting page in calibre to make an ebook.
But at the bottom of each chapter there is a link, return to center for military history which needs to eliminated manually, since it is not inside the ebook but out of it.
To make life easy on yourself, it is worthwhile to look over the proposed ebook online and note down any links like the one mentioned above that would take you out of it. In htt track options you can exclude links and these should be excluded so that you copy only what you want and not the whole website as it follows every link.