網(wǎng)頁(yè)遍歷器工具就是自動(dòng)訪問一些設(shè)置好的網(wǎng)頁(yè)軟件,可以按條件遍歷所有的網(wǎng)頁(yè)。格式中的%1會(huì)替換成右側(cè)的內(nèi)容。
優(yōu)點(diǎn):
網(wǎng)上找的都是固定的,還都有彈窗。這個(gè)自己可以在格式里編輯想遍歷的網(wǎng)址。刷流量的一般用的到!
相關(guān)閱讀:如何遍歷網(wǎng)頁(yè)內(nèi)圖片
以前做郵件客戶端時(shí),收發(fā)Html郵件情況下需要將內(nèi)嵌圖片枚舉,當(dāng)時(shí)Google了一遍,沒有找到可用的資料,都是些不全或錯(cuò)誤代碼。為了趕工,只有采用笨辦法:通過查找網(wǎng)頁(yè)源碼的辦法枚舉內(nèi)嵌圖片。
后來,查了一陣MSDN啃了其中干巴巴的英文,并度了N次,找到了想要的方法。
在窗體上放WebBrowser、Memo、按鈕,下面是源碼,如果有什么疑問請(qǐng)查閱MSDN。
var
doc: IHtmlDocument2;
i: Integer;
s: String;
begin
//iFile := WebBrowser1.Document as IPersistFile;
//iFile.Save('F:/tt.mht', False);
doc := WebBrowser1.Document as IHtmlDocument2;
if doc.images.length = 0 then exit;
Memo1.Clear;
for i := 0 to doc.images.length-1 do
with (doc.images.item(i,null) as IHTMLImgElement) do begin
s := name;
s := s + ';' + href;
s := s + ';' + src;
s := s + ';' + mimeType;
s := s + ';' + dynsrc;
s := s + ';' + vrml;
Memo1.Lines.Add(s);
end;
end;