acc.sosi.kr

var imgName,imgSrc,tmp='';
var patt1 = /C\d{4}/i;
var articles = document.getElementsByTagName('div');
function strMakeUp(filename, url) {
    return ('wget -O ' + filename + '.jpg ' + url);
}
for (var i = 0, k = articles.length; i < k; i++) {
    //抓出全部文章
    if (articles[i].className == 'entry') {
    imgSrc=articles[i].getElementsByTagName('a')[0].href;
    imgName = patt1.exec(articles[i].childNodes[1].childNodes[1].innerHTML);
    tmp+=(strMakeUp(imgName,imgSrc)+'\n');
    }
}
alert(tmp);