获取网站中的链接值并导航 [英] get the values of a link in website and navigate

查看:75
本文介绍了获取网站中的链接值并导航的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我在Windows窗体中使用网页浏览器控件来获取所在的文本html。 

< A onmousemove ="状态(0,'公司X');" onmouseout =" Status(1,'');" class = aThis href =" javascript:LinkCase(0,123456,'Company X',0,54321);"> Company X< / A> 

来自以上我想得到客户nr和客户名称。这将是:"123456"和"公司x"


我一直在调查youtube和谷歌以获取网络报废的一些线索,但它们都不起作用。


任何想法如何完成这件事?



解决方案


大家好,



我在Windows窗体中使用网页浏览器控件来获取html中的文字。 

< A onmousemove =" Status(0,'Company X');" onmouseout =" Status(1,'');" class = aThis href =" javascript:LinkCase(0,123456,'Company X',0,54321);"> Company X< / A> 

来自以上我想得到客户nr和客户名称。这将是:"123456"和"公司x"


我一直在调查youtube和谷歌以获取网络报废的一些线索,但它们都不起作用。


任何想法如何完成这件事?




你可能想要查看HTML Agility Pack:


http:// bfy.tw/G9T8


以下是一个简单的"入门指南"常规可能会有所帮助:


https://stackoverflow.com/questions/846994/how-to-use-html-agility-pack


Hi all,

I'm using a web browser controls in a windows form to get the text that is in the html. 

<A onmousemove="Status(0, 'Company X');" onmouseout="Status(1, '');" class=aThis href="javascript:LinkCase(0,123456,'Company X',0,54321);">Company X</A>

from the above I would like to get the customer nr and customer name. this would be: "123456" and "Company x"

I have been looking into youtube and google to get some clue on web scrapping, but none of them work.

any idea how to get this done?

解决方案

Hi all,

I'm using a web browser controls in a windows form to get the text that is in the html. 

<A onmousemove="Status(0, 'Company X');" onmouseout="Status(1, '');" class=aThis href="javascript:LinkCase(0,123456,'Company X',0,54321);">Company X</A>

from the above I would like to get the customer nr and customer name. this would be: "123456" and "Company x"

I have been looking into youtube and google to get some clue on web scrapping, but none of them work.

any idea how to get this done?

You might want to have a look for HTML Agility Pack:

http://bfy.tw/G9T8

The following is a simple "Get Started" routine that might help:

https://stackoverflow.com/questions/846994/how-to-use-html-agility-pack


这篇关于获取网站中的链接值并导航的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆