Scusate se disturbo.
Non riesco ad estrarre un'immagine di un prodotto di ebay tramite il webbrowser.
Questo codice l'ho usato per la copertina di facebook:
Su facebook funziona,su ebay no.codice:Dim images As System.Windows.Forms.HtmlElementCollection images = Webbrowser1.Document.GetElementsByTagName("img") For Each Img As System.Windows.Forms.HtmlElement In images If Img.OuterHtml.Contains("class=""coverPhotoImg photo img""") Then PictureBox1.ImageLocation = Img.GetAttribute("src") UrlImmagine = Img.GetAttribute("src") Exit For Else End If Next
Questo è il codice che uso su ebay:
Ho provato anche tramite id, con questo codice:codice:Dim images As System.Windows.Forms.HtmlElementCollection images = WebBrowser1.Document.GetElementsByTagName("img") For Each Img As System.Windows.Forms.HtmlElement In images If Img.OuterHtml.Contains("class=""img img500""") Then PictureBoxImmagineProdotto.ImageLocation = Img.GetAttribute("src") UrlImmagine = Img.GetAttribute("src") Exit For Else End If Next
Non funziona lo stesso, non mi restituisce niente.codice:UrlImmagine = WebBrowser1.Document.GetElementById("icImg").InnerText
Qualcuno sa come risolvere?
Grazie in anticipo.

 
			
			 
					
					
					
						 Rispondi quotando
  Rispondi quotando Originariamente inviata da aizenn
 Originariamente inviata da aizenn
					
