我试图创建一个网页刮刀,以编程搜索和显示从GLS网站装运信息。我在另一家货运公司的网站上使用了同样的功能,没有任何问题。
问题是,当调用WebBrowser1.Navigate(URL)
时,它返回一个空的html页面。
这是一个错误:
翻译:“网页浏览被取消”
这是我的密码:
Private Function SearchShipment(ByVal indexCodiceSpedizione As Integer) As Boolean
Try
WebBrowser1.Navigate("https://www.gls-italy.com/it/servizi-per-destinatari/ricerca-spedizione")
'I got the error here
WaitForPageLoad()
'Stuff to insert shipment code inside the website and search for infos
Return True
Catch ex As Exception
Return False
End Try
End Function
N.B. WebBrowser1
也在"www.gls-italy.com“上给了我同样的错误,但它与其他网站的效果非常好。
发布于 2018-09-24 05:28:04
最后,我发现在.NET 3.5
上,WebBrowser无法运行PHP、asp.net和JS。所以对我来说,目前还没有任何可能的解决方案。
https://stackoverflow.com/questions/52147909
复制相似问题