我试图从雅虎拉页的标题的Visual Basic和HTML敏捷性包
http://finance.yahoo.com/q?s=plug
我询问用户符号是创建网址:http://finance.yahoo.com/q?s=plug
程序的伟大工程时,我加载相同页面的局部的.html ...
这里是我的代码:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim symbol As String, htmldoc As New HtmlDocument
symbol = TextBox3.Text
htmldoc.Load("http://finance.yahoo.com/q?s=plug")
Dim items = htmldoc.DocumentNode.SelectNodes("//head/title").Select(Function(node) New KeyValuePair(Of String, String)(node.InnerText, node.InnerText))
For Each item As KeyValuePair(Of String, String) In items
Console.WriteLine(item.Key)
Console.WriteLine(item.Value)
Next
End Sub
任何人有任何想法如何我可以得到这项工作?我最终想拉股票等...
我也学习一个更简单的方法来做我想要完成的东西。而不是使用KeyValuePair等等......只是我终于得到了另一个SO问题的工作。
谢谢。
此外谁投了票,我一直在研究这个过去一周,我终于得到了这么多! – alex
您通常应该说明问题是什么以及您收到的错误。你基本上问过,“这是我的代码,我怎么做这个工作?” –