0

I have got the HtmlDocument of this url www.vipme.com/clothing_c900027 since their website include the encoded characterssite include special like :/&#47 here is my code

    Dim myHtmlDom As HtmlDocument = GetHtmlDocument(requestUrl, item.cookie, "refer", item.pageEncoding)
    Dim myProdDom As HtmlNodeCollection = myHtmlDom.DocumentNode.SelectNodes(item.prodPath)
    For Each inode As HtmlNode In myProdDom
        Dim newProd As New Product()    
        If (String.IsNullOrEmpty(item.urlPath)) Then
             newProd.Url = inode.GetAttributeValue(item.urlAttri, "").Trim()
        Else
            newProd.Url = inode.SelectSingleNode(item.urlPath).GetAttributeValue(item.urlAttri, "").Trim
            newProd.Url = Web.HttpUtility.UrlDecode(inode.SelectSingleNode(item.urlPath).GetAttributeValue(item.urlAttri, "").Trim)
        End If

seems it does't work when i debug enter image description here

hoyho
  • 21
  • 4

1 Answers1

0

finallly i change the UrlDecode to htmldecode method:

    decodeStr = inode.SelectSingleNode(item.urlPath).GetAttributeValue(item.urlAttri, "")
    newProd.Url = Web.HttpUtility.HtmlDecode(decodeStr).Trim()

and it works well

hoyho
  • 21
  • 4