Foxtable(狐表)用户栏目专家坐堂 → [求助]获取的文本为乱码(已解决)


  共有2298人关注过本帖树形打印复制链接

主题:[求助]获取的文本为乱码(已解决)

帅哥哟,离线,有人找我吗?
yyzlxc
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:七尾狐 帖子:1530 积分:10633 威望:0 精华:0 注册:2008/9/24 11:16:00
[求助]获取的文本为乱码(已解决)  发帖心情 Post By:2021/2/24 11:49:00 [只看该作者]

下面代码获取的文本为乱码,如何解决?请各位老师指教,谢谢!!

Dim obj_down As New System.Net.WebClient()
Dim data As String = obj_down.DownloadString("http://fund.eastmoney.com/f10/F10DataApi.aspx?type=lsjz&code=000136&page=1&per=2000")
output.Show(data)

如下:

var apidata={ content:"<table class='w782 comm lsjz'><thead><tr><th class='first'>鍑鍊兼棩鏈?/th><th>鍗曚綅鍑鍊?/th><th>绱鍑鍊?/th><th>鏃ュ闀跨巼</th><th>鐢宠喘鐘舵?/th><th>璧庡洖鐘舵?/th><th class='tor last'>鍒嗙孩閫侀厤</th></tr></thead><tbody><tr><td>2021-02-23</td><td class='tor bold'>5.2880</td><td class='tor bold'>5.6490</td><td class='tor bold grn'>-0.26%</td><td>寮鏀剧敵璐?/td><td>寮鏀捐祹鍥?/td><td class='red unbold'></td></tr><tr><td>2021-02-22</td><td class='tor bold'>5.3020</td><td class='tor bold'>5.6630</td><td class='tor bold grn'>-4.30%</td><td>寮鏀剧敵璐?/td><td>寮鏀捐祹鍥?/td><td class='red unbold'></td></tr><tr><td>2021-02-19</td><td class='tor bold'>5.5400</td><td class='tor bold'>5.9010</td><td class='tor bold grn'>-1.19%</td><td>寮鏀剧敵璐?/td><td>寮鏀捐祹鍥?/td><td class='red unbold'></td></tr><tr><td>2021-02-18</td><td class='tor bold'>5.6070</td><td class='tor bold'>5.9680</td><td class='tor bold grn'>-1.30%</td><td>寮鏀剧敵璐?/td><td>寮鏀捐祹鍥?/td><td class='red unbold'></td></tr><tr><td>2021-02-10</td><td class='tor bold'>5.6810</td><td class='tor bold'>6.0420</td><td class='tor bold red'>2.27%</td><td>寮鏀剧敵璐?/td><td>寮鏀捐祹鍥?/td><td class='red unbold'></td></tr><tr><td>2021-02-09</td><td class='tor bold'>5.5550</td><td class='tor bold'>5.9160</td><td class='tor bold red'>2.34%</td><td>寮鏀剧敵璐?/td><td>寮鏀捐祹鍥?/td><td class='red unbold'></td></tr><tr><td>2021-02-08</td><td class='tor bold'>5.4280</td><td class='tor bold'>5.7890</td><td class='tor bold red'>1.00%</td><td>寮鏀剧敵璐?/td><td>寮鏀捐祹鍥?/td><td class='red unbold'></td></tr><tr><td>2021-02-05</td><td class='tor bold'>5.3740</td><td class='tor bold'>5.7350</td><td class='tor bold red'>0.26%</td><td>寮鏀剧敵璐?/td><td>寮鏀捐祹鍥?/td><td class='red unbold'></td></tr><tr><td>2021-02-04</td><td class='tor bold'>5.3600</td><td class='tor bold'>5.7210</td><td class='tor bold grn'>-1.33%</td><td>寮鏀剧敵璐?/td><td>寮鏀捐祹鍥?/td><td class='red unbold'></td></tr><tr><td>2021-02-03</td><td class='tor bold'>5.4320</td><td class='tor bold'>5.7930</td><td class='tor bold grn'>-0.18%</td><td>寮鏀剧敵璐?/td><td>寮鏀捐祹鍥?/td><td class='red unbold'></td></tr><tr><td>2021-02-02</td><td class='tor bold'>5.4420</td><td class='tor bold'>5.8030</td><td class='tor bold red'>2.51%</td><td>寮鏀剧敵璐?/td><td>寮鏀捐祹鍥?/td><td class='red unbold'></td></tr><tr><td>2021-02-01</td><td class='tor bold'>5.3090</td><td class='tor bold'>5.6700</td><td class='tor bold red'>0.91%</td><td>寮鏀剧敵璐?/td><td>寮鏀捐祹鍥?/td><td class='red unbold'></td></tr><tr><td>2021-01-29</td><td class='tor bold'>5.2610</td><td class='tor bold'>5.6220</td><td class='tor bold grn'>-0.28%</td><td>寮鏀剧敵璐?/td><td>寮鏀捐祹鍥?/td><td class='red unbold'></td></tr><tr><td>2021-01-28</td><td class='tor bold'>5.2760</td><td class='tor bold'>5.6370</td><td class='tor bold grn'>-2.89%</td><td>寮鏀剧敵璐?/td><td>寮鏀捐祹鍥?/td><td class='red unbold'></td></tr><tr><td>2021-01-27</td><td class='tor bold'>5.4330</td><td class='tor bold'>5.7940</td><td class='tor bold red'>0.41%</td><td>寮鏀剧敵璐?/td><td>寮鏀捐祹鍥?/td><td class='red unbold'></td></tr><tr><td>2021-01-26</td><td class='tor bold'>5.4110</td><td class='tor bold'>5.7720</td><td class='tor bold grn'>-2.92%</td><td>寮鏀剧敵璐?/td><td>寮鏀捐祹鍥?/td><td class='red unbold'></td></tr><tr><td>2021-01-25</td><td class='tor bold'>5.5740</td><td class='tor bold'>5.9350</td><td class='tor bold red'>1.11%</td><td>寮鏀剧敵璐?/td><td>寮鏀捐祹鍥?/td><td class='red unbold'></td></tr><tr><td>2021-01-22</td><td class='tor bold'>5.5130</td><td class='tor bold'>5.8740</td><td class='tor bold red'>0.57%</td><td>寮鏀剧敵璐?/td><td>寮鏀捐祹鍥?/td><td class='red unbold'></td></tr><tr><td>2021-01-21</td><td class='tor bold'>5.4820</td><td class='tor bold'>5.8430</td><td class='tor bold red'>1.90%</td><td>寮鏀剧敵璐?/td><td>寮鏀捐祹鍥?/td><td class='red unbold'></td></tr><tr><td>2021-01-20</td><td class='tor bold'>5.3800</td><td class='tor bold'>5.7410</td><td class='tor bold red'>1.72%</td><td>寮鏀剧敵璐?/td><td>寮鏀捐祹鍥?/td><td class='red unbold'></td></tr></tbody></table>",records:1870,pages:94,curpage:1};
[此贴子已经被作者于2021/2/24 12:27:42编辑过]

 回到顶部
帅哥,在线噢!
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:110581 积分:562801 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2021/2/24 12:06:00 [只看该作者]

Dim hc As New HttpClient("http://fund.eastmoney.com/f10/F10DataApi.aspx?type=lsjz&code=000136&page=1&per=2000")
Dim res As String = hc.GetData()
MessageBox.Show(res)

 回到顶部
帅哥哟,离线,有人找我吗?
yyzlxc
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:七尾狐 帖子:1530 积分:10633 威望:0 精华:0 注册:2008/9/24 11:16:00
  发帖心情 Post By:2021/2/24 12:27:00 [只看该作者]

谢谢有点蓝老师的指教,问题解决。

 回到顶部