Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

For example, if I wanted to save all PNG files that I come across in Wikipedia articles, I could enter

*.wikipedia.org/*.png

Or if I wanted to save any file with pony in the filename, I could use

*pony*

Does a Chrome extension that provides this functionality exist? Using either wildcards or full-fledged regular expressions for the pattern matching is fairly immaterial.

share|improve this question
1  
nit: Those are wild-card or glob expressions. Do you want them or regexes? (not that I have an answer for you) –  Dennis Williamson Jan 24 '11 at 23:17
    
Very fine nit indeed. –  Bribles Jan 24 '11 at 23:20
    
I realize now that most extensions I've seen that do pattern matching use wildcards. –  Bribles Jan 24 '11 at 23:27
    
Could elaborate on which extensions do pattern matching with wildcards? - I haven't come across any. –  palbakulich Feb 11 '11 at 23:10
add comment

4 Answers

up vote 5 down vote accepted

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

share|improve this answer
add comment

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.

share|improve this answer
add comment

You could use the nirsoft tool Chrome Cache View. It does exactly this, it's not a chrome extension, but it runs on Windows.

share|improve this answer
    
Doesn't do the URL matching the user wants. –  Isaac Rabinovitch Nov 4 '12 at 1:59
add comment

Not really what you asked for, but I think it bears mentioning. The best extension I have seen is actually for Firefox and it's called BatchDownload. It provides wildcards to generate download URLs (like curl) and will also allow you to do substring matching to all the links on a given page. I find it quite useful.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.