如何从HTML代码获取信息 [英] How to get info from HTML code

查看:72
本文介绍了如何从HTML代码获取信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试从以下位置检索信息没有成功;
http://www.find-ip-address.org/ [

I try without success to retrieve the information from;
http://www.find-ip-address.org/[^]

I still do not understand how to get infos even i researched and saw some videos on youtube about it.


These codelines i need;

<b>My IP Country Name</b>:&nbsp;&nbsp;<font color='#980000'> Macedonia</font>&nbsp;&nbsp;<img src='images/cflags/mk.png'><br><strong>My IP Country Continent</strong>: <font color='#980000'>Europe</font>
 <font color='#980000'>(EU)</font>
<br><strong>My IP Country Latitude</strong>: (41.83)
<br><strong>My IP Country Longitude</strong>: (22)
<br><b>My IP Country Code</b>:&nbsp;&nbsp;MKD&nbsp;&nbsp;(MK)<br><br><strong>My IP Address Region</strong>: <font color='#980000'>Karpos</font>
<br><b>My IP Address City</b>:&nbsp;&nbsp; <font color='#980000'>Skopje</font><br><b>My IP Address Latitude</b>: (42)<br><b>My IP Address Longtitude</b>: (21.4333)<br><br><strong>My ISP (Internet Service Provider)</strong>:&nbsp;<font color='#980000'> ONE Telecommunications Services Stock Company Skop</font><br />
<strong>My IP Address lookup</strong> for <b>79.126.139.207</b> show IP which belongs to:&nbsp;<font color='#980000'>ONE PPPoE Broadband Internet Loc</font><br />
<b>My Time zone</b>: Europe/Skopje<br><b>My Local time</b>:<span id=localTime>Europe/Skopje</span><br></TD>






如您所见,我想获取有关我的位置的信息;
我需要;

我的IP国家名称(显示为马其顿")
我的IP国家/地区:欧洲(EU)
我的IP国家/地区纬度:(41.83)
我的IP国家经度:(22)
我的IP国家/地区代码:MKD(MK)

我的IP地址区域:Karpos
我的IP地址所在城市:斯科普里
我的IP地址纬度:(42)
我的IP地址经度:(21.4333)

我的ISP(Internet服务提供商):一家电信服务股份公司Skop
我在79.126.171.184的IP地址查询中显示了属于以下类别的IP:一个PPPoE宽带Internet Loc
我的时区:欧洲/斯科普里
我的本地时间:欧洲/斯科普里

在此先感谢您,我是否总是使用网络浏览器下载html,还是可以通过downloadstring(uri)来获取它呢?
请告诉我代码,如果有时间的话,谢谢






As you can see i want to obtain the infos about my location;
I need;

My IP Country Name ("which is shown as" Macedonia)
My IP Country Continent: Europe (EU)
My IP Country Latitude: (41.83)
My IP Country Longitude: (22)
My IP Country Code: MKD (MK)

My IP Address Region: Karpos
My IP Address City: Skopje
My IP Address Latitude: (42)
My IP Address Longtitude: (21.4333)

My ISP (Internet Service Provider): ONE Telecommunications Services Stock Company Skop
My IP Address lookup for 79.126.171.184 show IP which belongs to: ONE PPPoE Broadband Internet Loc
My Time zone: Europe/Skopje
My Local time:Europe/Skopje

Thanks in advance and by the way do i always to use a webbrowser to download the html or can i via downloadstring(uri) obtain it too?
Please show me the code how to if you have time, thanks

推荐答案

您需要使用 Web抓取的技术:
http://en.wikipedia.org/wiki/Web_scraping [ http://msdn.microsoft.com/en-us/library/system.net. webrequest.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/system.net. ftpwebrequest.aspx [ ^ ].

有关更多详细信息,请参阅我过去的答案:
从网页中获取特定数据 [如何从另一个站点获取数据 [ ^ ].

—SA
You need to use the techniques of Web scraping:
http://en.wikipedia.org/wiki/Web_scraping[^].

You can do it with VB.NET, basically, using the class System.Net.FtpWebRequest:
http://msdn.microsoft.com/en-us/library/system.net.webrequest.aspx[^],
http://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest.aspx[^].

For more detail, please see my past answers:
get specific data from web page[^],
How to get the data from another site[^].

—SA


这是我在本网站上上传的有关上述问题的文章,请人们对其进行评价并留下评论! br/>
http://www.codeproject.com/script/Articles/ArticleVersion.aspx? waid = 39633& aid = 469003 [ ^ ]
Here is an article which i uploaded on this website its about the above question, go people check it out and rate it and leave a comment!

http://www.codeproject.com/script/Articles/ArticleVersion.aspx?waid=39633&aid=469003[^]


这篇关于如何从HTML代码获取信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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