从WebRequest中提取一些数据 [英] Extract some data from WebRequest

查看:71
本文介绍了从WebRequest中提取一些数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有三个文本框:我的页面中的作者,标题和价格。如果我搜索它应该去亚马逊页面并在我的页面中提取书籍和显示。

I Have Three Text Boxes: Author, Title And Price In My Page. If I Search It Should Go To Amazon Page And Extract Books And Display In My Page.

HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "GET";
response = request.GetResponse();
reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8);
result = reader.ReadToEnd();



这里我得到结果中的所有html数据后我不知道该怎么做请帮帮我


Here i am getting the all html data in result there after i am not knowing what to do please help me

推荐答案

使用 HtmlAgilityPackage [ ^ ]


Ponnam Balakrishna写道:
Ponnam Balakrishna wrote:

我已经提取了该页面的所有HTML数据。我不知道接下来该做什么,比如解析和查找书籍。

I have extracted all the HTML data of the page. I don't know what to do next, like parsing and finding the books.

你已经告诉了你需要做什么,解析等等。



基本上,这是 Web抓取的问题: http://en.wikipedia.org/wiki / Webscraping [ ^ ]。

对于一些基本想法,请参阅我过去的答案:

从网页获取特定数据 [ ^ ],

如何从其他网站获取数据 [ ^ ]。



-SA

You already told what you need to do, parsing, etc.

Basically, this is a problem of "Web scraping": http://en.wikipedia.org/wiki/Webscraping[^].
For some basic ideas, please see my past answers:
get specific data from web page[^],
How to get the data from another site[^].

—SA


这篇关于从WebRequest中提取一些数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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