Is there a Chrome extension that will save all viewed resources whose URL match a given expression?

I'm sorry, I haven't found an extension, but in linux you could raid google-chrome's cache for the images - if only from 1 site, clear your cache first then load the pages you want to get images from.

To find google's cache -- use your file manager (thunar / nautilus / whatever ) to navigate to /home/yourusername/.cache/google-chrome/Default/Cache (This is a hidden folder)

Now that you know where all those downloaded images and stuffs have gone lets see if we can get them out of there, and rename them with proper extensions (your gonna have to rename each one to something comprehensible) HERE Goes... -->

Example 1: to find JPEG files under /home/yourusername/.cache/google-chrome/Default/Cache

open a terminal... cd /home/yourusername/.cache/google-chrome/Default/Cache

 find -type f -print0 | xargs -0 file -i | grep -i JPEG | awk {'print $1'} | sed 's/^..//g' | sed 's/.$//g' > /tmp/FILESTOMOVE.txt

The command explained...

  1. find -type f = find files

  2. xarg -0 file -i = output the mime type

  3. grep -i JPEG = only show give me JPEG files

  4. awk {'print $1'} | sed 's/^..//g' | sed 's/.$//g' = tidy up file names

  5. > /tmp/FILESTOMOVE.txt = create a filelist for moving.

    Just change grep -i JPEG to PNG or GIF or FLASH etc --- the -i flag denotes case-insensitive (so you could just use grep -i jpeg / png / gif etc)

Now you have a list of files... I have a little command I use to move that list to somewhere.

#!/bin/bash

IFS=$'\n'
mkdir -p /home/yourusername/Downloads/saved_from_google_cache/
if [ -f /tmp/FILESTOMOVE.txt ];then
     cat /tmp/FILESTOMOVE.txt |
     while read newfile; 
     do
        mv $newfile /home/yourusername/Downloads/saved_from_google_cache/
    done
fi

Save it as move_google_cached in /usr/bin or /usr/sbin and chmod 755 move_google_cached


I ended up creating a Perl script using HTTP::Proxy. It was pretty easy using the examples, but there is the hassle of changing your proxy settings every time you need to use it.