在网站 HTML 中查找标签

发布于 2024-09-18 01:52:49 字数 174 浏览 2 评论 0原文

我正在使用 Perl。

我有标签,例如:“XYZ_PKM_HTML” 我希望能够提供一个基本网址,例如:www.example.com 并获取此标签出现的 HTML 页面(不一定是主页,这很简单)。 是否可以?有什么想法吗? (或者已经制作了模块,查看 cpan,有一些有趣的东西,但无法安装)

谢谢,

I'm using Perl.

I have the tag, for example: "XYZ_PKM_HTML"
I would like to be able to provide a base url, for example: www.example.com
and the to get the HTML page (not necessarily the main page, thats easy) where this tag appears.
is it possible? any idea? (or already made modules, looked on cpan, there were some interesting stuff, but not installable)

Thanks,

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

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

发布评论

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

评论(3

累赘 2024-09-25 01:53:03

尝试 Perl 中的 Web-Scraper。 Web-Scraper 模块信息
它易于使用,您可以搜索特定标签或元素并从中获取数据。

Try Web-Scraper in Perl. Web-Scraper module info.
It is easy to work with and you can search for specific tags or elements and get the data from it.

婴鹅 2024-09-25 01:53:01

您似乎想要实现一个网站爬虫和搜索器。您通常使用 WWW::Mechanize 执行前者,使用 HTML::Twig 执行后者。

You seem to want to implement a web site crawler and a searcher. You usually do the former with WWW::Mechanize and the latter with HTML::Twig

陈年往事 2024-09-25 01:52:59

MJD 有一个关于用高阶 Perl 编写网络蜘蛛的扩展示例。这是第 4.7 节。请参阅第 4 章第 187 页

当然,您也可以尝试他提到的 WWW::SimpleRobot 模块。

MJD has an extended example on writing a web spider in Higher-Order Perl. It is section 4.7. See page 187 in Chapter 4.

Of course, you can also try the WWW::SimpleRobot module he mentions.

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