Is there a Chrome extension that will save all viewed resources whose URL match a given expression?
Solution 1
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...
-
find -type f
= find files -
xarg -0 file -i
= output the mime type -
grep -i JPEG
= only show give me JPEG files -
awk {'print $1'} | sed 's/^..//g' | sed 's/.$//g'
= tidy up file names -
> /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
Solution 2
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.
Related videos on Youtube
Bribles
Updated on September 17, 2022Comments
-
Bribles over 1 year
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.
-
Dennis Williamson over 13 yearsnit: Those are wild-card or glob expressions. Do you want them or regexes? (not that I have an answer for you)
-
Bribles over 13 yearsVery fine nit indeed.
-
Bribles over 13 yearsI realize now that most extensions I've seen that do pattern matching use wildcards.
-
palbakulich over 13 yearsCould elaborate on which extensions do pattern matching with wildcards? - I haven't come across any.
-