Documentation

Image selector

Image selector can extract src attribute (URL) of an image.

Note! When selecting CSS selector for image selector all the images within the site are moved to the top. If this feature somehow breaks sites layout please report it as a bug.

Configuration options

  • selector - CSS selector for the image element.
  • multiple - multiple records are being extracted. Usually should not be checked for Image selector.

Use cases

See Text selector use cases.

Image downloader script

Image downloader script finds image urls scraped by Image Selector in a csv file and downloads them. It will try to download images from all URLs that are stored in columns that names end with -src. web-scraper-order and web-scraper-start-url columns are required in order for script to work. Images are renamed to <web-scraper-order>-<selector-name>.ext.

Windows usage

  1. Download and install python 3.x from here: https://www.python.org/downloads/
  2. Download image downloader script from here: https://github.com/webscraperio/image-downloader/tags
  3. Scrape the target site and export data in CSV format
  4. Drag and drop the CSV file on top of the image-downloader.py Fig. 1: windows image download

macOS, Linux usage

  1. Install python if necessary through your package manager. Most likely you already have it pre-installed.
  2. Download image downloader script from here: https://github.com/webscraperio/image-downloader/tags
  3. Move image-downloader.py to Downloads directory
  4. Scrape the target site and export data in CSV format
  5. Save the CSV file in Downloads directory
  6. Open Terminal application. You should have one pre-installed
  7. Change working to Downloads directory by typing:
    cd Downloads
  8. Run image downloader script by typing:
    python image-downloader.py scraped_data.csv

Fig. 2: macOS image download


Was this page helpful?