js 简单版,拿好,可以结合 casperjs 使用
==========
Array.prototype.uniquestr = function(){
var res = [];
var json = {};
for(var i = 0; i < this.length; i++){
if(!json[this[i]]){
res.push(this[i]);
json[this[i]] = 1;
}
}
return res;
}
var reg = /\w+.(
googleusercontent.com|
ggpht.com)\/(\w|[-])+/g;
var html = document.documentElement.innerHTML;
var para = "=s1200";
var htmlele = html.match(reg);
function unique(a) {return Array.from(new Set(a));}
var uniqele = unique(htmlele);
var newuniqele = uniqele.uniquestr();
for(var i = 0;i < newuniqele.length; i++) {
console.log(newuniqele[i]+para+"\n");
}