Task is simple. Have a tool which will parse CSS
on network website, read the links to images from there and download all of them to structured folders to local disc.
The important is that tool should ready to use, and designer should be able to use. Answer "you can write the tool itself is OK", but not acceptible for r开发者_如何学编程eady tool .
You can get urls from css manually with regular expressions.
To accompany Roman's answer:
/\burl\(['"]?([^'"\)]+)['"]?\)\b/g
will match as $1
almost all images (almost all meaning, that the central part ['"\)]
is a bit too strict and will not match URLs with either of these characters in it).
Note that you might get external stylesheets ('@import
'), too, with this regexp.
精彩评论