How do I download all images from a web page and prefix the image names with the web page's URL (all symbols replaced with underscores)?
For example, if I were to download all images from http://www.amazon.com/gp/product/B0029KH944/, then the main product image would be saved using this filename:
www_amazon_com_gp_product_B0029KH944_41RaFZ6S-0L._SL500_AA300_.jpg
I have installed WinHTTrack and wget and spent more time than it's probably worth to get them to do what I wanted, but I was not successful, so Stack Overflow is my last ditch effort. (WinHTTrack came close if you set the build option to save files according to site structure and write a script to rename files based on their parent directories, but the problem is that the main image is hosted on a different domain.)