开发者

Get a particular text from website

I'm look开发者_开发百科ing for a way if you know the location where to read the text for example say, under a particular category, how would you connect to a website and search & read the text from it? what steps do i need to follow to learn about that?


you could use libcurl/cURL for your HTML retrival


You're probably looking for a web crawler.

Here's an example of a simple crawler written in C++.

Moreover, you might want to have a look to wget, a software to retrieve files via HTTP, HTTPS and FTP.


if you are looking at a specific web-page, you could try retrieving the page and parsing it to get to the exact location you want. e.g. specific div, etc.

since you are using c++, you could try reading up on using libcurl to retrieve the information you need from the URL.


You can download an html file with WinHTTP(working example) and then search the file. There's some find algos in the std::string class for searching if your needs are relatively basic.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜