Download Manager - links to anchors don't work

I’ve spent some time playing with Download Manager to try to import full sites. I want it to create a full local archive so that I can navigate the exact site without having an internet connection. I managed to get this going pretty easily by choosing “Subdirectory (Complete)” as the type. Sometimes the site links to certain assets such as stylesheets and images on a different host, and DTP pulls those down and sticks them in another dir. Fine by me. After it pulls everything down I import it into DTP and things look good. I make the navigation a bit simpler by finding the main index.html file (which is sometimes buried under several folders) and move it to the top-level folder. Somehow DTP is keeping track of everything and it Just Works.

I’ve run into two issues though. The first is that linking back to the index doesn’t work. For example if I use Download Manager to download it will correctly download everything accessible from that page and below that subdir, including assets from other hosts. Links to outside hosts don’t work, which I expect and am happy with. However the bolded link to “cucumber” doesn’t work, even though that file was downloaded by DTP and is the first page I clicked on in the archive!

The second is that DTP doesn’t seem to be able to handle anchors in links at all. So if I pull down a site and one of the pages links to /foo.html#bar then the link becomes unclickable without an internet connection. Instead of realizing that it should open up /foo.html and then scroll down to #bar, DTP just doesn’t attempt to load anything at all (I think what’s happening is that it sees there’s no internet connection and just stays on the current page)

Those are my two concerns at this point. The first isn’t so annoying because I can just go back to the top dir and click index.html. The second one is very annoying though, as I’m downloading a bunch of API docs that have hundreds / thousands of these links with anchors on them.

The download is really slick and when I’m searching for something specific it’s brilliant and takes me right to the page I’m looking for. If I could somehow get it to handle anchors correctly it would be absolutely perfect.

Well, one other thing :slight_smile: DTP names all the files index.html. It would be more useful to me if it named the file after the tag on the page. So instead of index.html the name would be “Home - cucumber” or whatever. That might be something I can do myself with an AppleScript…has someone done this already, or is there another way to do it?

Just to note, I tried SiteSucker per some suggestions I’ve seen elsewhere on the forums. I wasn’t able to get it to handle off-host assets properly, and DTP seemed unable to import the results anyway - many pages were just blank. The Download Manager import is sooooooooo close to what I’m looking for, I just need to figure out this anchor linking thing and I’m set.

There’s already such a script, see Scripts > Rename > To Web Page Title. In addition, I will check the handling of anchors.

I would like internal links working also. :smiley: