Python 的 Mechanize 有 scala 版本吗?

发布于 2024-08-02 08:18:40 字数 258 浏览 1 评论 0原文

我在 Python 中使用了 mechanize 并取得了巨大成功。不过,我正在努力学习Scala。我有一个 IRC 机器人,我想为其添加一些功能,主要与从我们公司内部网屏幕抓取网页有关。这需要重定向到公司范围的登录页面,然后转到目的地,然后可能必须提交另一次登录。

有谁知道我可以使用 Scala 来获得此类功能吗?

I have used mechanize in Python with great success. However, I am trying to learn Scala. I have an IRC bot that I would like to add some features to, mostly having to do with screen scraping web pages from our corporate intranet. That requires being redirected to a corp-wide login page, then going to the destination, then having to possibly submit another login.

Does anyone know of something that I can use from Scala to get this sort of functionality?

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

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

发布评论

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

评论(2

心如狂蝶 2024-08-09 08:18:40

我不知道 Scala 是否有类似功能的成果。在等待相反的答案时,我建议您寻找具有类似功能的 Java 库。

I don't know any Scala effort of similar functionality. Pending answers to the contrary, I advise you to look for Java libraries of similar functionality.

葬心 2024-08-09 08:18:40

我能想到的最接近的 Java 库是浏览器驱动程序。最知名的是 SeleniumWebDriver。后者还提供进程内模式。

由于 Selenium 的 API 并不是那么好用,因此出现了一些带有 DSLish 外观的项目: Selenium DSL Selenium Inspector

需要注意的是,它们都是面向 Web 应用程序测试的,因此它们可能缺乏适合您的案例的功能。

The closest Java libraries I can think of are browser drivers. The most well-known are Selenium and WebDriver. The latter also offers an in-process mode.

Since Selenium's API isn't all that pleasent to use, a couple of projects sprung-up with DSLish façades: Selenium DSL and Selenium Inspector.

A caveat is that they are all oriented towards testing of web application, so they might be lacking in features that attend your case.

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