04-04-18, 10:10 PM
دا مثال تحميل صور من جوجل
بيجيب كل روابط الصور فله
بيجيب كل روابط الصور فله
كود :
On Error Resume Next
For Each ele As HtmlElement In WebBrowser1.Document.Links
Dim eletarget As String = ele.GetAttribute("href")
If eletarget.IndexOf("http") >= 0 Then
Dim str2 As String = eletarget.Substring((eletarget.IndexOf("http") - 7))
pc = ((str2.Substring(0, str2.IndexOf("&img")) & ChrW(3)))
End If
no = pc.Replace("http//", "")
f ((pc.IndexOf("http") <> -1) AndAlso (pc.IndexOf(".gif") <> -1)) Then
pc = pc.Replace("/ihttp", "http")
listbox(pc)
End If
If ((pc.IndexOf("http") <> -1) AndAlso (n.IndexOf(".ico") <> -1)) Then
pc = pc.Replace("/ihttp", "http")
listbox.Add(pc)
End If
End If
Next
Return