Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8486741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:02:11+00:00 2026-06-10T21:02:11+00:00

How do I download all images from a web page and prefix the image

  • 0

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.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T21:02:13+00:00Added an answer on June 10, 2026 at 9:02 pm

    Well, I added a download option to my new Webscraper.

    With that you can do it like this:

     xidel "http://www.amazon.com/dp/B0029KH944/" -e 'site:=translate(filter($_url, "http://(.*)", 1), "/.", "__")'  -f //img -e 'image:=filter($_url, ".*/(.*)", 1)' --download '$site;$image;'
    

    First -e reads the url and removes the /. characters, the -f selects all imgs, the -e second reads the filenames and –download downloads it then…

    ALthough it has the disadvantage that it tries to parse every image as an html file, which could slow it down a little bit…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to download all the images in a directory from my web
I currently use FixedThreadPool to download images from the web, like this: ExecutorService mThreadPool
All I need to do is download some basic text-based and image files from
My goal is to get all images from document, then download all images bigger
I have created a class to download images from web. Issue is there is
i would like to download all of images from this site but after downloading
I am using wget to download all images from a website and it works
I want to download all files (html, images, js, css) from one website. I
When I download images from web and save them to the SDcard in my
This question is continuation to my previous question over stack overflow how-to-download-images-asynchronously-from-web-server . I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.