抓取网页内容

发布于 2024-08-12 16:11:10 字数 245 浏览 4 评论 0原文

我刚刚开始研究这个问题,我想抓取我的 Netgear 路由器 (http:// /192.168.0.1/setup.cgi?next_file=stattbl.htm) 统计数据到 csv 文件中。

我运行Win & Linux,但主要了解C++,有链接/解决方案吗?

I've just started looking into this, I want to scrape my Netgear Router (http://192.168.0.1/setup.cgi?next_file=stattbl.htm) stats into a csv file.

I run Win & Linux, but mainly know C++, any links/solutions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

慵挽 2024-08-19 16:11:10

正如 MYYN 所建议的,类似 BeautifulSoupHpricot 确实擅长这类事情,所以如果你不完全相信它必须用 C++ 编写,你真的应该研究一下那些( python 和 ruby​​ 的基础知识都可以很快掌握,而且肯定比 C++ 简单得多)。或者,查看 QTDOMDocumentTinyXML++

As MYYN suggested, something like BeautifulSoup or Hpricot really excels at this sort of thing, so if you aren't absolutely convinced that it has to be in C++, you really should look into those(the basics of both python and ruby can be picked up pretty quickly and are certainly much simpler than C++). Alternatively, check out QTDOMDocument and TinyXML++.

挖个坑埋了你 2024-08-19 16:11:10

我知道并编写了 C++,但对于屏幕抓取,我宁愿使用一些脚本语言,例如 python 和一些方便的库,例如 http://www.crummy.com/software/BeautifulSoup/

尤其是在 Linux 上,Python 应该已经安装(或者至少可以通过包管理器轻松安装)。

i know and wrote c++, but for screen scraping i'd rather use some scripting language like python with some handy libraries, e.g. http://www.crummy.com/software/BeautifulSoup/

especially on linux, python should be installed already (or at least easily installable via package managers).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文